summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/specs/run/remote_cjs_main/__test__.jsonc5
-rw-r--r--tests/specs/run/remote_cjs_main/output.out3
-rw-r--r--tests/testdata/run/add.cjs3
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;
+};