Skip to content

Commit a68811d

Browse files
committed
Add test to return spreaded multi type from multi type function
1 parent 3e2e4cc commit a68811d

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

test/unit/helpers/multi.spec.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,18 @@ test.each<[string, number[]]>([
8080
.expectDiagnosticsToMatchSnapshot(diagnostics);
8181
});
8282

83+
test("function to spread multi type result from multi type function", () => {
84+
util.testFunction`
85+
${multiFunction}
86+
function m() {
87+
return $multi(...multi(true));
88+
}
89+
return m();
90+
`
91+
.setOptions(multiProjectOptions)
92+
.expectToEqual(true);
93+
});
94+
8395
test("$multi helper call with destructuring assignment side effects", () => {
8496
util.testModule`
8597
${multiFunction}

0 commit comments

Comments
 (0)