diff options
| author | Kevin (Kun) "Kassimo" Qian <kevinkassimo@gmail.com> | 2019-05-03 12:03:10 -0700 |
|---|---|---|
| committer | Ryan Dahl <ry@tinyclouds.org> | 2019-05-03 15:03:10 -0400 |
| commit | 401a5c021141d4ba5a71078b28f6daefcd1826a6 (patch) | |
| tree | d8fd8b92d0be5a84620dc818cc29842d58e1c815 /tests | |
| parent | 4648277fb4aa0f7258a316b8828a1175e3e2d132 (diff) | |
feat: support .mjs extension resolution (#2283)
Removed `extmap` and added .mjs entry in `map_file_extension`.
The assert in the compiler does not need to be updated, since it is
resolving from the compiled cache instead of elsewhere (notice the .map
is asserted next to it)
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/021_mjs_modules.test | 2 | ||||
| -rw-r--r-- | tests/021_mjs_modules.ts | 2 | ||||
| -rw-r--r-- | tests/021_mjs_modules.ts.out | 1 | ||||
| -rw-r--r-- | tests/subdir/mod5.mjs | 1 |
4 files changed, 6 insertions, 0 deletions
diff --git a/tests/021_mjs_modules.test b/tests/021_mjs_modules.test new file mode 100644 index 000000000..9b60b9d97 --- /dev/null +++ b/tests/021_mjs_modules.test @@ -0,0 +1,2 @@ +args: --reload tests/021_mjs_modules.ts +output: tests/021_mjs_modules.ts.out diff --git a/tests/021_mjs_modules.ts b/tests/021_mjs_modules.ts new file mode 100644 index 000000000..6052b9081 --- /dev/null +++ b/tests/021_mjs_modules.ts @@ -0,0 +1,2 @@ +import { isMod5 } from "./subdir/mod5.mjs"; +console.log(isMod5); diff --git a/tests/021_mjs_modules.ts.out b/tests/021_mjs_modules.ts.out new file mode 100644 index 000000000..27ba77dda --- /dev/null +++ b/tests/021_mjs_modules.ts.out @@ -0,0 +1 @@ +true diff --git a/tests/subdir/mod5.mjs b/tests/subdir/mod5.mjs new file mode 100644 index 000000000..f21d8862b --- /dev/null +++ b/tests/subdir/mod5.mjs @@ -0,0 +1 @@ +export const isMod5 = true; |
