diff options
author | Kitson Kelly <me@kitsonkelly.com> | 2022-01-31 20:32:49 +1100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-01-31 20:32:49 +1100 |
commit | 68c8c66b0f0889657e48742aed05030c70e0a266 (patch) | |
tree | 159623288194f1e2ef9b27da25b0c5f20bd211f3 /cli/tests | |
parent | 49a0db0d2a2a697320ea95bacaca9bc61199c951 (diff) |
fix(cli): handle extensionless imports better (#13548)
Fixes #13526
Diffstat (limited to 'cli/tests')
-rw-r--r-- | cli/tests/integration/run_tests.rs | 6 | ||||
-rw-r--r-- | cli/tests/testdata/import_extensionless.ts | 3 | ||||
-rw-r--r-- | cli/tests/testdata/import_extensionless.ts.out | 2 |
3 files changed, 11 insertions, 0 deletions
diff --git a/cli/tests/integration/run_tests.rs b/cli/tests/integration/run_tests.rs index 74a03e055..3d50a09a3 100644 --- a/cli/tests/integration/run_tests.rs +++ b/cli/tests/integration/run_tests.rs @@ -1488,6 +1488,12 @@ itest!(import_file_with_colon { http_server: true, }); +itest!(import_extensionless { + args: "run --quiet --reload import_extensionless.ts", + output: "import_extensionless.ts.out", + http_server: true, +}); + itest!(classic_workers_event_loop { args: "run --enable-testing-features-do-not-use classic_workers_event_loop.js", diff --git a/cli/tests/testdata/import_extensionless.ts b/cli/tests/testdata/import_extensionless.ts new file mode 100644 index 000000000..689d553ff --- /dev/null +++ b/cli/tests/testdata/import_extensionless.ts @@ -0,0 +1,3 @@ +import { printHello3 } from "http://localhost:4545/v1/extensionless"; + +printHello3(); diff --git a/cli/tests/testdata/import_extensionless.ts.out b/cli/tests/testdata/import_extensionless.ts.out new file mode 100644 index 000000000..699b756ed --- /dev/null +++ b/cli/tests/testdata/import_extensionless.ts.out @@ -0,0 +1,2 @@ +[WILDCARD] +Hello |