diff options
author | David Sherret <dsherret@users.noreply.github.com> | 2024-10-14 23:57:31 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-10-15 03:57:31 +0000 |
commit | ae6a2b23bae83795bd973414216a89c839dd8fda (patch) | |
tree | 648bc0f65e9fa41de5f75188f87473d37912f291 /tests | |
parent | 7f3747f2ef7cc9e1d45aa33360afdfe62cd20c56 (diff) |
fix: do not panic running remote cjs module (#26259)
Instead error.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/specs/run/remote_cjs_main/__test__.jsonc | 5 | ||||
-rw-r--r-- | tests/specs/run/remote_cjs_main/output.out | 3 | ||||
-rw-r--r-- | tests/testdata/run/add.cjs | 3 |
3 files changed, 11 insertions, 0 deletions
diff --git a/tests/specs/run/remote_cjs_main/__test__.jsonc b/tests/specs/run/remote_cjs_main/__test__.jsonc new file mode 100644 index 000000000..f45d09406 --- /dev/null +++ b/tests/specs/run/remote_cjs_main/__test__.jsonc @@ -0,0 +1,5 @@ +{ + "args": "run http://localhost:4545/run/add.cjs", + "output": "output.out", + "exitCode": 1 +} diff --git a/tests/specs/run/remote_cjs_main/output.out b/tests/specs/run/remote_cjs_main/output.out new file mode 100644 index 000000000..f75c33907 --- /dev/null +++ b/tests/specs/run/remote_cjs_main/output.out @@ -0,0 +1,3 @@ +Download http://localhost:4545/run/add.cjs +error: Expected a JavaScript or TypeScript module, but identified a Cjs module. Importing these types of modules is currently not supported. + Specifier: http://localhost:4545/run/add.cjs diff --git a/tests/testdata/run/add.cjs b/tests/testdata/run/add.cjs new file mode 100644 index 000000000..2a886fbc1 --- /dev/null +++ b/tests/testdata/run/add.cjs @@ -0,0 +1,3 @@ +module.exports.add = function (a, b) { + return a + b; +}; |