Skip to content

Commit 89410d0

Browse files
committed
JS: Add failing test
1 parent 72c7024 commit 89410d0

File tree

2 files changed

+28
-0
lines changed

2 files changed

+28
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
| wrap-async-in-thunk.js:5:25:5:137 | /* def= ... ed() */ | Node not found on this line (but there is one on line wrap-async-in-thunk.js:14). |
2+
| wrap-async-in-thunk.js:5:25:5:137 | /* def= ... ed() */ | Node not found on this line (but there is one on line wrap-async-in-thunk.js:24). |
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
import * as t from "testlib";
2+
3+
async function getData1() {
4+
const data = await fetch("https://example.com/content");
5+
return data.json(); /* def=moduleImport("testlib").getMember("exports").getMember("foo").getParameter(0).getReturn().getPromised() */
6+
}
7+
8+
export function use1() {
9+
t.foo(() => getData1());
10+
}
11+
12+
async function getData2() {
13+
const data = await fetch("https://example.com/content");
14+
return data.json(); /* def=moduleImport("testlib").getMember("exports").getMember("foo").getParameter(0).getReturn().getPromised() */
15+
}
16+
17+
export function use2() {
18+
t.foo(getData2);
19+
}
20+
21+
export function use3() {
22+
t.foo(async () => {
23+
const data = await fetch("https://example.com/content");
24+
return data.json(); /* def=moduleImport("testlib").getMember("exports").getMember("foo").getParameter(0).getReturn().getPromised() */
25+
});
26+
}

0 commit comments

Comments
 (0)