We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0e95182 commit 063883bCopy full SHA for 063883b
1 file changed
meta/tests/src/runInWorker.test.ts
@@ -7,7 +7,25 @@ const runInWorkerFixturesDir = rootDir.concat(
7
test("basic functionality", async () => {
8
const result = await evaluate(`
9
void runInWorker(2, function addThree(i) {
10
- return i + 3;
+ 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);
29
}).then(console.log, console.error);
30
`);
31
0 commit comments