Skip to content

Commit 063883b

Browse files
committed
add another case to runInWorker test
1 parent 0e95182 commit 063883b

1 file changed

Lines changed: 19 additions & 1 deletion

File tree

meta/tests/src/runInWorker.test.ts

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,25 @@ const runInWorkerFixturesDir = rootDir.concat(
77
test("basic functionality", async () => {
88
const result = await evaluate(`
99
void runInWorker(2, function addThree(i) {
10-
return i + 3;
10+
return i + 3;
11+
}).then(console.log, console.error);
12+
`);
13+
14+
expect(result).toMatchInlineSnapshot(`
15+
{
16+
"code": 0,
17+
"error": null,
18+
"stderr": "",
19+
"stdout": "5
20+
",
21+
}
22+
`);
23+
});
24+
25+
test("async", async () => {
26+
const result = await evaluate(`
27+
void runInWorker(2, function addThree(i) {
28+
return Promise.resolve(i + 3);
1129
}).then(console.log, console.error);
1230
`);
1331

0 commit comments

Comments
 (0)