summaryrefslogtreecommitdiff
path: root/tests/testdata
diff options
context:
space:
mode:
authorBartek IwaƄczuk <biwanczuk@gmail.com>2024-05-03 01:00:38 +0100
committerGitHub <noreply@github.com>2024-05-03 00:00:38 +0000
commitcf0579c7d4b69fcb205fb0d5320e0a00012720ee (patch)
tree114fe9f5a83aa17b01374de39364cfdf176db147 /tests/testdata
parent1b27b5839624ebf9fef65cea28a17281f3b79a74 (diff)
test: npm registry handles two test scopes (#23663)
This commit updates our testing npm registry to handle additional `@denotest2` scope in addition to `@denotest` scope. I might have to update it further in the future to handle additional scopes, but it's good enough for now.
Diffstat (limited to 'tests/testdata')
-rw-r--r--tests/testdata/npm/registry/@denotest2/basic/1.0.0/main.d.mts3
-rw-r--r--tests/testdata/npm/registry/@denotest2/basic/1.0.0/main.mjs11
-rw-r--r--tests/testdata/npm/registry/@denotest2/basic/1.0.0/other.mjs3
-rw-r--r--tests/testdata/npm/registry/@denotest2/basic/1.0.0/package.json7
4 files changed, 24 insertions, 0 deletions
diff --git a/tests/testdata/npm/registry/@denotest2/basic/1.0.0/main.d.mts b/tests/testdata/npm/registry/@denotest2/basic/1.0.0/main.d.mts
new file mode 100644
index 000000000..29da1e6d7
--- /dev/null
+++ b/tests/testdata/npm/registry/@denotest2/basic/1.0.0/main.d.mts
@@ -0,0 +1,3 @@
+export declare function setValue(val: number): void;
+export declare function getValue(): number;
+export declare const url: string;
diff --git a/tests/testdata/npm/registry/@denotest2/basic/1.0.0/main.mjs b/tests/testdata/npm/registry/@denotest2/basic/1.0.0/main.mjs
new file mode 100644
index 000000000..0a44f7585
--- /dev/null
+++ b/tests/testdata/npm/registry/@denotest2/basic/1.0.0/main.mjs
@@ -0,0 +1,11 @@
+let value = 0;
+
+export function setValue(newValue) {
+ value = newValue;
+}
+
+export function getValue() {
+ return value;
+}
+
+export const url = import.meta.url;
diff --git a/tests/testdata/npm/registry/@denotest2/basic/1.0.0/other.mjs b/tests/testdata/npm/registry/@denotest2/basic/1.0.0/other.mjs
new file mode 100644
index 000000000..00ed99da4
--- /dev/null
+++ b/tests/testdata/npm/registry/@denotest2/basic/1.0.0/other.mjs
@@ -0,0 +1,3 @@
+export function hello() {
+ return "hello, world!";
+} \ No newline at end of file
diff --git a/tests/testdata/npm/registry/@denotest2/basic/1.0.0/package.json b/tests/testdata/npm/registry/@denotest2/basic/1.0.0/package.json
new file mode 100644
index 000000000..d7129c348
--- /dev/null
+++ b/tests/testdata/npm/registry/@denotest2/basic/1.0.0/package.json
@@ -0,0 +1,7 @@
+{
+ "name": "@denotest2/basic",
+ "version": "1.0.0",
+ "type": "module",
+ "main": "main.mjs",
+ "types": "main.d.mts"
+}