summaryrefslogtreecommitdiff
path: root/tests/specs
diff options
context:
space:
mode:
authorDavid Sherret <dsherret@users.noreply.github.com>2024-11-19 09:57:12 -0500
committerGitHub <noreply@github.com>2024-11-19 09:57:12 -0500
commit186b52731c6bb326c4d32905c5e732d082e83465 (patch)
tree043316c7fc58f18e29c42f35ebfbc6b68eddcca1 /tests/specs
parent661aa22c03f829489e2d9289dee0a8292a95227a (diff)
fix(node): handle resolving ".//<something>" in npm packages (#26920)
The issue was this package had an import like: `".//index.js"` and we resolved that as specified, but node normalizes it to `"./index.js"` so we have to copy node.
Diffstat (limited to 'tests/specs')
-rw-r--r--tests/specs/npm/specifier_two_slashes/__test__.jsonc4
-rw-r--r--tests/specs/npm/specifier_two_slashes/main.ts3
2 files changed, 7 insertions, 0 deletions
diff --git a/tests/specs/npm/specifier_two_slashes/__test__.jsonc b/tests/specs/npm/specifier_two_slashes/__test__.jsonc
new file mode 100644
index 000000000..bddbdbc1c
--- /dev/null
+++ b/tests/specs/npm/specifier_two_slashes/__test__.jsonc
@@ -0,0 +1,4 @@
+{
+ "args": "run --quiet main.ts",
+ "output": "3\n"
+}
diff --git a/tests/specs/npm/specifier_two_slashes/main.ts b/tests/specs/npm/specifier_two_slashes/main.ts
new file mode 100644
index 000000000..ef1adceb5
--- /dev/null
+++ b/tests/specs/npm/specifier_two_slashes/main.ts
@@ -0,0 +1,3 @@
+import { add } from "npm:@denotest/specifier-two-slashes";
+
+console.log(add(1, 2));