Skip to content

Commit c5f73cb

Browse files
committed
JS: Add test showing spurious .css import
1 parent 7e987c5 commit c5f73cb

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 A from "./a.css";
2+
3+
A.bar();

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ test_ImportSpecifiers
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 |
99
| import-ts-with-js-extension.ts:1:10:1:12 | foo | import-ts-with-js-extension.ts:1:10:1:12 | foo |
10+
| importcss.js:1:8:1:8 | A | importcss.js:1:8:1:8 | A |
1011
| m/c.js:1:8:1:13 | * as b | m/c.js:1:13:1:13 | b |
1112
| tst.html:5:10:5:10 | f | tst.html:5:10:5:10 | f |
1213
| unresolved.js:1:8:1:8 | f | unresolved.js:1:8:1:8 | f |
@@ -37,6 +38,7 @@ test_ImportDefaultSpecifiers
3738
| b.js:1:8:1:8 | f |
3839
| f.ts:1:8:1:8 | g |
3940
| import-in-mjs.mjs:1:8:1:24 | exported_from_mjs |
41+
| importcss.js:1:8:1:8 | A |
4042
| tst.html:5:10:5:10 | f |
4143
| unresolved.js:1:8:1:8 | f |
4244
test_getImportedName
@@ -47,6 +49,7 @@ test_getImportedName
4749
| g.ts:1:9:1:11 | foo | foo |
4850
| import-in-mjs.mjs:1:8:1:24 | exported_from_mjs | default |
4951
| import-ts-with-js-extension.ts:1:10:1:12 | foo | foo |
52+
| importcss.js:1:8:1:8 | A | default |
5053
| tst.html:5:10:5:10 | f | default |
5154
| unresolved.js:1:8:1:8 | f | default |
5255
test_ExportDeclarations
@@ -70,6 +73,7 @@ test_getAnImportedModule
7073
| library-tests/Modules/f.ts | library-tests/Modules/e.js |
7174
| library-tests/Modules/g.ts | library-tests/Modules/f.ts |
7275
| library-tests/Modules/import-ts-with-js-extension.ts | library-tests/Modules/f.ts |
76+
| library-tests/Modules/importcss.js | library-tests/Modules/a.js |
7377
| library-tests/Modules/m/c.js | library-tests/Modules/b.js |
7478
test_getSourceNode
7579
| a.js:1:1:3:1 | export ... n 23;\\n} | default | a.js:1:16:3:1 | functio ... n 23;\\n} |
@@ -93,6 +97,7 @@ test_Imports
9397
| g.ts:1:1:1:23 | import ... m './f' | g.ts:1:19:1:23 | './f' | 1 |
9498
| import-in-mjs.mjs:1:1:1:46 | import ... n-mjs'; | import-in-mjs.mjs:1:31:1:45 | 'export-in-mjs' | 1 |
9599
| 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 |
100+
| importcss.js:1:1:1:24 | import ... a.css"; | importcss.js:1:15:1:23 | "./a.css" | 1 |
96101
| m/c.js:1:1:1:26 | import ... '../b'; | m/c.js:1:20:1:25 | '../b' | 1 |
97102
| tst.html:5:3:5:20 | import f from 'a'; | tst.html:5:17:5:19 | 'a' | 1 |
98103
| unresolved.js:1:1:1:18 | import f from 'a'; | unresolved.js:1:15:1:17 | 'a' | 1 |

0 commit comments

Comments
 (0)