diff options
Diffstat (limited to 'tests/specs')
-rw-r--r-- | tests/specs/npm/lossy_utf8_module/__test__.jsonc | 5 | ||||
-rw-r--r-- | tests/specs/npm/lossy_utf8_module/main.mjs | 3 | ||||
-rw-r--r-- | tests/specs/npm/lossy_utf8_module/main.out | 3 | ||||
-rw-r--r-- | tests/specs/npm/lossy_utf8_package_json/__test__.jsonc | 5 | ||||
-rw-r--r-- | tests/specs/npm/lossy_utf8_package_json/main.mjs | 3 | ||||
-rw-r--r-- | tests/specs/npm/lossy_utf8_package_json/main.out | 3 | ||||
-rw-r--r-- | tests/specs/npm/lossy_utf8_script/__test__.jsonc | 5 | ||||
-rw-r--r-- | tests/specs/npm/lossy_utf8_script/main.mjs | 3 | ||||
-rw-r--r-- | tests/specs/npm/lossy_utf8_script/main.out | 3 | ||||
-rw-r--r-- | tests/specs/npm/lossy_utf8_script_from_cjs/__test__.jsonc | 6 | ||||
-rw-r--r-- | tests/specs/npm/lossy_utf8_script_from_cjs/main.mjs | 10 | ||||
-rw-r--r-- | tests/specs/npm/lossy_utf8_script_from_cjs/main.out | 4 |
12 files changed, 53 insertions, 0 deletions
diff --git a/tests/specs/npm/lossy_utf8_module/__test__.jsonc b/tests/specs/npm/lossy_utf8_module/__test__.jsonc new file mode 100644 index 000000000..1ee7d2d6c --- /dev/null +++ b/tests/specs/npm/lossy_utf8_module/__test__.jsonc @@ -0,0 +1,5 @@ +{ + "args": "run main.mjs", + "output": "main.out", + "exitCode": 0 +} diff --git a/tests/specs/npm/lossy_utf8_module/main.mjs b/tests/specs/npm/lossy_utf8_module/main.mjs new file mode 100644 index 000000000..54cfbb16a --- /dev/null +++ b/tests/specs/npm/lossy_utf8_module/main.mjs @@ -0,0 +1,3 @@ +import mod from "npm:@denotest/lossy-utf8-module@1.0.0"; + +console.log(mod); diff --git a/tests/specs/npm/lossy_utf8_module/main.out b/tests/specs/npm/lossy_utf8_module/main.out new file mode 100644 index 000000000..0e96f9ebb --- /dev/null +++ b/tests/specs/npm/lossy_utf8_module/main.out @@ -0,0 +1,3 @@ +Download http://localhost:4260/@denotest/lossy-utf8-module +Download http://localhost:4260/@denotest/lossy-utf8-module/1.0.0.tgz +���� diff --git a/tests/specs/npm/lossy_utf8_package_json/__test__.jsonc b/tests/specs/npm/lossy_utf8_package_json/__test__.jsonc new file mode 100644 index 000000000..1ee7d2d6c --- /dev/null +++ b/tests/specs/npm/lossy_utf8_package_json/__test__.jsonc @@ -0,0 +1,5 @@ +{ + "args": "run main.mjs", + "output": "main.out", + "exitCode": 0 +} diff --git a/tests/specs/npm/lossy_utf8_package_json/main.mjs b/tests/specs/npm/lossy_utf8_package_json/main.mjs new file mode 100644 index 000000000..9a63eb604 --- /dev/null +++ b/tests/specs/npm/lossy_utf8_package_json/main.mjs @@ -0,0 +1,3 @@ +import mod from "npm:@denotest/lossy-utf8-package-json@1.0.0"; + +console.log(mod); diff --git a/tests/specs/npm/lossy_utf8_package_json/main.out b/tests/specs/npm/lossy_utf8_package_json/main.out new file mode 100644 index 000000000..99aa5ab61 --- /dev/null +++ b/tests/specs/npm/lossy_utf8_package_json/main.out @@ -0,0 +1,3 @@ +Download http://localhost:4260/@denotest/lossy-utf8-package-json +Download http://localhost:4260/@denotest/lossy-utf8-package-json/1.0.0.tgz +hello diff --git a/tests/specs/npm/lossy_utf8_script/__test__.jsonc b/tests/specs/npm/lossy_utf8_script/__test__.jsonc new file mode 100644 index 000000000..1ee7d2d6c --- /dev/null +++ b/tests/specs/npm/lossy_utf8_script/__test__.jsonc @@ -0,0 +1,5 @@ +{ + "args": "run main.mjs", + "output": "main.out", + "exitCode": 0 +} diff --git a/tests/specs/npm/lossy_utf8_script/main.mjs b/tests/specs/npm/lossy_utf8_script/main.mjs new file mode 100644 index 000000000..59fe555aa --- /dev/null +++ b/tests/specs/npm/lossy_utf8_script/main.mjs @@ -0,0 +1,3 @@ +import mod from "npm:@denotest/lossy-utf8-script@1.0.0"; + +console.log(mod); diff --git a/tests/specs/npm/lossy_utf8_script/main.out b/tests/specs/npm/lossy_utf8_script/main.out new file mode 100644 index 000000000..180ecdf1c --- /dev/null +++ b/tests/specs/npm/lossy_utf8_script/main.out @@ -0,0 +1,3 @@ +Download http://localhost:4260/@denotest/lossy-utf8-script +Download http://localhost:4260/@denotest/lossy-utf8-script/1.0.0.tgz +���� diff --git a/tests/specs/npm/lossy_utf8_script_from_cjs/__test__.jsonc b/tests/specs/npm/lossy_utf8_script_from_cjs/__test__.jsonc new file mode 100644 index 000000000..c8d353de0 --- /dev/null +++ b/tests/specs/npm/lossy_utf8_script_from_cjs/__test__.jsonc @@ -0,0 +1,6 @@ +{ + "args": "run --node-modules-dir --allow-read main.mjs", + "output": "main.out", + "exitCode": 0, + "tempDir": true +} diff --git a/tests/specs/npm/lossy_utf8_script_from_cjs/main.mjs b/tests/specs/npm/lossy_utf8_script_from_cjs/main.mjs new file mode 100644 index 000000000..a9e70adfb --- /dev/null +++ b/tests/specs/npm/lossy_utf8_script_from_cjs/main.mjs @@ -0,0 +1,10 @@ +import { createRequire } from "node:module"; + +// Import this so that deno_graph knows to download this file. +if (false) import("npm:@denotest/lossy-utf8-script@1.0.0"); + +const require = createRequire(import.meta.url); + +const mod = require("@denotest/lossy-utf8-script"); + +console.log(mod); diff --git a/tests/specs/npm/lossy_utf8_script_from_cjs/main.out b/tests/specs/npm/lossy_utf8_script_from_cjs/main.out new file mode 100644 index 000000000..4f062a2ae --- /dev/null +++ b/tests/specs/npm/lossy_utf8_script_from_cjs/main.out @@ -0,0 +1,4 @@ +Download http://localhost:4260/@denotest/lossy-utf8-script +Download http://localhost:4260/@denotest/lossy-utf8-script/1.0.0.tgz +Initialize @denotest/lossy-utf8-script@1.0.0 +���� |