Skip to content

Commit ccce020

Browse files
committed
JS: Add test
1 parent 32cf0f1 commit ccce020

File tree

3 files changed

+9
-0
lines changed

3 files changed

+9
-0
lines changed

javascript/ql/test/query-tests/Expressions/MissingAwait/MissingAwait.expected

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
| tsTest.ts:4:12:4:19 | cache[x] | Missing await. This value is always a promise. |
12
| tst.js:8:9:8:13 | thing | Missing await. The value 'thing' is always a promise. |
23
| tst.js:10:9:10:13 | thing | Missing await. The value 'thing' is always a promise. |
34
| tst.js:12:15:12:19 | thing | Missing await. The value 'thing' is always a promise. |
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
declare let cache: { [x: string]: Promise<any> };
2+
3+
function deleteCache(x: string) {
4+
delete cache[x]; // OK
5+
}
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"include": ["."]
3+
}

0 commit comments

Comments
 (0)