JS: Move babel-root-import test

This moves the test for the babel `root-import` plugin into the new
unit test for import resolution, so we only have one set of tests to
maintain.

The actual implementation is added in the next commit.
This commit is contained in:
Asger F
2025-04-28 12:52:24 +02:00
parent 6725cb5b8c
commit e4420f63fb
20 changed files with 7 additions and 20 deletions

View File

@@ -0,0 +1 @@
import f from '~/a'; // $ MISSING: importTarget=BabelRootImport/tst1/a.js

View File

@@ -0,0 +1 @@
import f from '~/a'; // $ MISSING: importTarget=BabelRootImport/tst1/a.js

View File

@@ -0,0 +1,2 @@
import g from '~/b.js'; // $ MISSING: importTarget=BabelRootImport/tst2/src/js/b.js
import f from '#/a'; // $ MISSING: importTarget=BabelRootImport/tst1/a.js

View File

@@ -0,0 +1 @@
import greeting from '~/b.js'; // $ MISSING: importTarget=BabelRootImport/tst3/src/b.js

View File

@@ -0,0 +1,2 @@
import g from '~/b.js'; // $ MISSING: importTarget=BabelRootImport/tst4/src/js/b.js
import f from '#/a'; // $ MISSING: importTarget=BabelRootImport/tst1/a.js

View File

@@ -1,9 +0,0 @@
| tst1/index.js:1:1:1:20 | import f from '~/a'; | tst1/a.js:1:1:2:0 | <toplevel> |
| tst1/nested/tst.js:1:1:1:20 | import f from '~/a'; | tst1/a.js:1:1:2:0 | <toplevel> |
| tst2/index.js:1:1:1:23 | import ... /b.js'; | tst2/src/js/b.js:1:1:2:0 | <toplevel> |
| tst2/index.js:2:1:2:20 | import f from '#/a'; | tst1/a.js:1:1:2:0 | <toplevel> |
| tst2/index.js:2:1:2:20 | import f from '#/a'; | tst1/index.js:1:1:2:0 | <toplevel> |
| tst3/index.js:1:1:1:30 | import ... /b.js'; | tst3/src/b.js:1:1:2:0 | <toplevel> |
| tst4/index.js:1:1:1:23 | import ... /b.js'; | tst4/src/js/b.js:1:1:2:0 | <toplevel> |
| tst4/index.js:2:1:2:20 | import f from '#/a'; | tst1/a.js:1:1:2:0 | <toplevel> |
| tst4/index.js:2:1:2:20 | import f from '#/a'; | tst1/index.js:1:1:2:0 | <toplevel> |

View File

@@ -1,4 +0,0 @@
import javascript
from Import i
select i, i.getImportedModule()

View File

@@ -1 +0,0 @@
import f from '~/a';

View File

@@ -1,2 +0,0 @@
import g from '~/b.js';
import f from '#/a';

View File

@@ -1 +0,0 @@
import greeting from '~/b.js';

View File

@@ -1,2 +0,0 @@
import g from '~/b.js';
import f from '#/a';