Skip to content

Commit e5ba80b

Browse files
committed
JS: Add test
1 parent 82b35a1 commit e5ba80b

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
import { foo } from "./f.js";
2+
3+
foo();

javascript/ql/test/library-tests/Modules/tests.expected

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ test_ImportSpecifiers
66
| f.ts:1:8:1:8 | g | f.ts:1:8:1:8 | g |
77
| g.ts:1:9:1:11 | foo | g.ts:1:9:1:11 | foo |
88
| import-in-mjs.mjs:1:8:1:24 | exported_from_mjs | import-in-mjs.mjs:1:8:1:24 | exported_from_mjs |
9+
| import-ts-with-js-extension.ts:1:10:1:12 | foo | import-ts-with-js-extension.ts:1:10:1:12 | foo |
910
| m/c.js:1:8:1:13 | * as b | m/c.js:1:13:1:13 | b |
1011
| tst.html:5:10:5:10 | f | tst.html:5:10:5:10 | f |
1112
| unresolved.js:1:8:1:8 | f | unresolved.js:1:8:1:8 | f |
@@ -43,6 +44,7 @@ test_getImportedName
4344
| f.ts:1:8:1:8 | g | default |
4445
| g.ts:1:9:1:11 | foo | foo |
4546
| import-in-mjs.mjs:1:8:1:24 | exported_from_mjs | default |
47+
| import-ts-with-js-extension.ts:1:10:1:12 | foo | foo |
4648
| tst.html:5:10:5:10 | f | default |
4749
| unresolved.js:1:8:1:8 | f | default |
4850
test_ExportDeclarations
@@ -65,6 +67,7 @@ test_getAnImportedModule
6567
| es2015_require.js | d.js |
6668
| f.ts | e.js |
6769
| g.ts | f.ts |
70+
| import-ts-with-js-extension.ts | f.ts |
6871
| m/c.js | b.js |
6972
test_getSourceNode
7073
| a.js:1:1:3:1 | export ... n 23;\\n} | default | a.js:1:16:3:1 | functio ... n 23;\\n} |
@@ -87,13 +90,15 @@ test_Imports
8790
| f.ts:1:1:1:19 | import g from './e' | f.ts:1:15:1:19 | './e' | 1 |
8891
| g.ts:1:1:1:23 | import ... m './f' | g.ts:1:19:1:23 | './f' | 1 |
8992
| import-in-mjs.mjs:1:1:1:46 | import ... n-mjs'; | import-in-mjs.mjs:1:31:1:45 | 'export-in-mjs' | 1 |
93+
| import-ts-with-js-extension.ts:1:1:1:29 | import ... /f.js"; | import-ts-with-js-extension.ts:1:21:1:28 | "./f.js" | 1 |
9094
| m/c.js:1:1:1:26 | import ... '../b'; | m/c.js:1:20:1:25 | '../b' | 1 |
9195
| tst.html:5:3:5:20 | import f from 'a'; | tst.html:5:17:5:19 | 'a' | 1 |
9296
| unresolved.js:1:1:1:18 | import f from 'a'; | unresolved.js:1:15:1:17 | 'a' | 1 |
9397
test_NamedImportSpecifier
9498
| d.js:1:10:1:21 | default as g |
9599
| d.js:1:24:1:29 | x as y |
96100
| g.ts:1:9:1:11 | foo |
101+
| import-ts-with-js-extension.ts:1:10:1:12 | foo |
97102
test_GlobalVariableRef
98103
| a.js:5:31:5:31 | o |
99104
| exports.js:3:9:3:15 | exports |

0 commit comments

Comments
 (0)