summaryrefslogtreecommitdiff
path: root/tests/specs
diff options
context:
space:
mode:
authorDavid Sherret <dsherret@users.noreply.github.com>2024-04-29 14:09:58 -0400
committerGitHub <noreply@github.com>2024-04-29 14:09:58 -0400
commit48daf2dc88c2ec340af37a176fd9351010b38929 (patch)
tree2786d25438ef867d97bce60cbfac01fbe22bbdfe /tests/specs
parent67d00fb1e37c7e2de55ab2aa376a5e57009fb2a9 (diff)
chore: add tests for moduleGraph2 (#23603)
Also did some renames from underscores to hyphens
Diffstat (limited to 'tests/specs')
-rw-r--r--tests/specs/jsr/deps/main.out14
-rw-r--r--tests/specs/jsr/deps/main_info.out20
-rw-r--r--tests/specs/jsr/module_graph/__test__.jsonc2
-rw-r--r--tests/specs/jsr/module_graph/main.out10
-rw-r--r--tests/specs/jsr/module_graph/main.ts2
-rw-r--r--tests/specs/jsr/module_graph/main_info.out12
-rw-r--r--tests/specs/jsr/module_graph2/__test__.jsonc10
-rw-r--r--tests/specs/jsr/module_graph2/main.out5
-rw-r--r--tests/specs/jsr/module_graph2/main.ts3
-rw-r--r--tests/specs/jsr/module_graph2/main_info.out14
-rw-r--r--tests/specs/jsr/no_module_graph/main.out8
-rw-r--r--tests/specs/jsr/no_module_graph/main.ts2
-rw-r--r--tests/specs/jsr/no_module_graph/main_info.out12
-rw-r--r--tests/specs/jsr/no_module_graph/multiple.ts4
14 files changed, 74 insertions, 44 deletions
diff --git a/tests/specs/jsr/deps/main.out b/tests/specs/jsr/deps/main.out
index 621703c4b..48f75c081 100644
--- a/tests/specs/jsr/deps/main.out
+++ b/tests/specs/jsr/deps/main.out
@@ -1,13 +1,13 @@
Download http://127.0.0.1:4250/@denotest/deps/meta.json
Download http://127.0.0.1:4250/@denotest/deps/1.0.0_meta.json
-Download http://127.0.0.1:4250/@denotest/module_graph/meta.json
-Download http://127.0.0.1:4250/@denotest/no_module_graph/meta.json
-Download http://127.0.0.1:4250/@denotest/module_graph/1.4.0_meta.json
-Download http://127.0.0.1:4250/@denotest/no_module_graph/0.1.1_meta.json
+Download http://127.0.0.1:4250/@denotest/module-graph/meta.json
+Download http://127.0.0.1:4250/@denotest/no-module-graph/meta.json
+Download http://127.0.0.1:4250/@denotest/module-graph/1.4.0_meta.json
+Download http://127.0.0.1:4250/@denotest/no-module-graph/0.1.1_meta.json
[UNORDERED_START]
Download http://127.0.0.1:4250/@denotest/deps/1.0.0/mod.ts
-Download http://127.0.0.1:4250/@denotest/module_graph/1.4.0/other.ts
-Download http://127.0.0.1:4250/@denotest/no_module_graph/0.1.1/mod.ts
-Download http://127.0.0.1:4250/@denotest/no_module_graph/0.1.1/TestClass.ts
+Download http://127.0.0.1:4250/@denotest/module-graph/1.4.0/other.ts
+Download http://127.0.0.1:4250/@denotest/no-module-graph/0.1.1/mod.ts
+Download http://127.0.0.1:4250/@denotest/no-module-graph/0.1.1/TestClass.ts
[UNORDERED_END]
{ version: "0.1.1", other: Other {} }
diff --git a/tests/specs/jsr/deps/main_info.out b/tests/specs/jsr/deps/main_info.out
index c4d412707..0abdfa940 100644
--- a/tests/specs/jsr/deps/main_info.out
+++ b/tests/specs/jsr/deps/main_info.out
@@ -1,14 +1,14 @@
Download http://127.0.0.1:4250/@denotest/deps/meta.json
Download http://127.0.0.1:4250/@denotest/deps/1.0.0_meta.json
-Download http://127.0.0.1:4250/@denotest/module_graph/meta.json
-Download http://127.0.0.1:4250/@denotest/no_module_graph/meta.json
-Download http://127.0.0.1:4250/@denotest/module_graph/1.4.0_meta.json
-Download http://127.0.0.1:4250/@denotest/no_module_graph/0.1.1_meta.json
+Download http://127.0.0.1:4250/@denotest/module-graph/meta.json
+Download http://127.0.0.1:4250/@denotest/no-module-graph/meta.json
+Download http://127.0.0.1:4250/@denotest/module-graph/1.4.0_meta.json
+Download http://127.0.0.1:4250/@denotest/no-module-graph/0.1.1_meta.json
[UNORDERED_START]
Download http://127.0.0.1:4250/@denotest/deps/1.0.0/mod.ts
-Download http://127.0.0.1:4250/@denotest/module_graph/1.4.0/other.ts
-Download http://127.0.0.1:4250/@denotest/no_module_graph/0.1.1/mod.ts
-Download http://127.0.0.1:4250/@denotest/no_module_graph/0.1.1/TestClass.ts
+Download http://127.0.0.1:4250/@denotest/module-graph/1.4.0/other.ts
+Download http://127.0.0.1:4250/@denotest/no-module-graph/0.1.1/mod.ts
+Download http://127.0.0.1:4250/@denotest/no-module-graph/0.1.1/TestClass.ts
[UNORDERED_END]
local: [WILDCARD]main.ts
type: TypeScript
@@ -17,6 +17,6 @@ size: [WILDCARD]
file:///[WILDCARD]main.ts ([WILDCARD])
└─┬ http://127.0.0.1:4250/@denotest/deps/1.0.0/mod.ts ([WILDCARD])
- ├── http://127.0.0.1:4250/@denotest/module_graph/1.4.0/other.ts ([WILDCARD])
- └─┬ http://127.0.0.1:4250/@denotest/no_module_graph/0.1.1/mod.ts ([WILDCARD])
- └── http://127.0.0.1:4250/@denotest/no_module_graph/0.1.1/TestClass.ts ([WILDCARD])
+ ├── http://127.0.0.1:4250/@denotest/module-graph/1.4.0/other.ts ([WILDCARD])
+ └─┬ http://127.0.0.1:4250/@denotest/no-module-graph/0.1.1/mod.ts ([WILDCARD])
+ └── http://127.0.0.1:4250/@denotest/no-module-graph/0.1.1/TestClass.ts ([WILDCARD])
diff --git a/tests/specs/jsr/module_graph/__test__.jsonc b/tests/specs/jsr/module_graph/__test__.jsonc
index a8837a8b5..16b086e8b 100644
--- a/tests/specs/jsr/module_graph/__test__.jsonc
+++ b/tests/specs/jsr/module_graph/__test__.jsonc
@@ -1,6 +1,6 @@
{
"steps": [{
- "args": "run main.ts",
+ "args": "run --log-level=debug main.ts",
"output": "main.out"
}, {
"cleanDenoDir": true,
diff --git a/tests/specs/jsr/module_graph/main.out b/tests/specs/jsr/module_graph/main.out
index 1cd0115b9..0bc19aeba 100644
--- a/tests/specs/jsr/module_graph/main.out
+++ b/tests/specs/jsr/module_graph/main.out
@@ -1,7 +1,5 @@
-Download http://127.0.0.1:4250/@denotest/module_graph/meta.json
-Download http://127.0.0.1:4250/@denotest/module_graph/1.4.0_meta.json
-[UNORDERED_START]
-Download http://127.0.0.1:4250/@denotest/module_graph/1.4.0/other.ts
-Download http://127.0.0.1:4250/@denotest/module_graph/1.4.0/mod.ts
-[UNORDERED_END]
+[WILDCARD]Caching module info for http://[WILDLINE]/@denotest/module-graph/1.4.0/mod.ts
+[WILDCARD]Caching module info for http://[WILDLINE]/@denotest/module-graph/1.4.0/other.ts
+[WILDCARD]
Test { other: Other {} }
+[WILDCARD]
diff --git a/tests/specs/jsr/module_graph/main.ts b/tests/specs/jsr/module_graph/main.ts
index c92823cc2..3f95747c5 100644
--- a/tests/specs/jsr/module_graph/main.ts
+++ b/tests/specs/jsr/module_graph/main.ts
@@ -1,3 +1,3 @@
-import { Test } from "jsr:@denotest/module_graph";
+import { Test } from "jsr:@denotest/module-graph";
console.log(new Test());
diff --git a/tests/specs/jsr/module_graph/main_info.out b/tests/specs/jsr/module_graph/main_info.out
index c35cca5b4..5e9e85163 100644
--- a/tests/specs/jsr/module_graph/main_info.out
+++ b/tests/specs/jsr/module_graph/main_info.out
@@ -1,8 +1,8 @@
-Download http://127.0.0.1:4250/@denotest/module_graph/meta.json
-Download http://127.0.0.1:4250/@denotest/module_graph/1.4.0_meta.json
+Download http://127.0.0.1:4250/@denotest/module-graph/meta.json
+Download http://127.0.0.1:4250/@denotest/module-graph/1.4.0_meta.json
[UNORDERED_START]
-Download http://127.0.0.1:4250/@denotest/module_graph/1.4.0/mod.ts
-Download http://127.0.0.1:4250/@denotest/module_graph/1.4.0/other.ts
+Download http://127.0.0.1:4250/@denotest/module-graph/1.4.0/mod.ts
+Download http://127.0.0.1:4250/@denotest/module-graph/1.4.0/other.ts
[UNORDERED_END]
local: [WILDCARD]main.ts
type: TypeScript
@@ -10,5 +10,5 @@ dependencies: 2 unique
size: [WILDCARD]
file:///[WILDCARD]/module_graph/main.ts ([WILDCARD])
-└─┬ http://127.0.0.1:4250/@denotest/module_graph/1.4.0/mod.ts ([WILDCARD])
- └── http://127.0.0.1:4250/@denotest/module_graph/1.4.0/other.ts ([WILDCARD])
+└─┬ http://127.0.0.1:4250/@denotest/module-graph/1.4.0/mod.ts ([WILDCARD])
+ └── http://127.0.0.1:4250/@denotest/module-graph/1.4.0/other.ts ([WILDCARD])
diff --git a/tests/specs/jsr/module_graph2/__test__.jsonc b/tests/specs/jsr/module_graph2/__test__.jsonc
new file mode 100644
index 000000000..16b086e8b
--- /dev/null
+++ b/tests/specs/jsr/module_graph2/__test__.jsonc
@@ -0,0 +1,10 @@
+{
+ "steps": [{
+ "args": "run --log-level=debug main.ts",
+ "output": "main.out"
+ }, {
+ "cleanDenoDir": true,
+ "args": "info main.ts",
+ "output": "main_info.out"
+ }]
+}
diff --git a/tests/specs/jsr/module_graph2/main.out b/tests/specs/jsr/module_graph2/main.out
new file mode 100644
index 000000000..9f37a0382
--- /dev/null
+++ b/tests/specs/jsr/module_graph2/main.out
@@ -0,0 +1,5 @@
+[WILDCARD]Caching module info for http://[WILDLINE]/@denotest/module-graph2/1.4.0/mod.ts
+[WILDCARD]Caching module info for http://[WILDLINE]/@denotest/module-graph2/1.4.0/other.ts
+[WILDCARD]
+Test { other: Other {} }
+[WILDCARD]
diff --git a/tests/specs/jsr/module_graph2/main.ts b/tests/specs/jsr/module_graph2/main.ts
new file mode 100644
index 000000000..150bfef24
--- /dev/null
+++ b/tests/specs/jsr/module_graph2/main.ts
@@ -0,0 +1,3 @@
+import { Test } from "jsr:@denotest/module-graph2";
+
+console.log(new Test());
diff --git a/tests/specs/jsr/module_graph2/main_info.out b/tests/specs/jsr/module_graph2/main_info.out
new file mode 100644
index 000000000..266ee6d96
--- /dev/null
+++ b/tests/specs/jsr/module_graph2/main_info.out
@@ -0,0 +1,14 @@
+Download http://127.0.0.1:4250/@denotest/module-graph2/meta.json
+Download http://127.0.0.1:4250/@denotest/module-graph2/1.4.0_meta.json
+[UNORDERED_START]
+Download http://127.0.0.1:4250/@denotest/module-graph2/1.4.0/mod.ts
+Download http://127.0.0.1:4250/@denotest/module-graph2/1.4.0/other.ts
+[UNORDERED_END]
+local: [WILDCARD]main.ts
+type: TypeScript
+dependencies: 2 unique
+size: [WILDCARD]
+
+file:///[WILDCARD]/module_graph2/main.ts ([WILDCARD])
+└─┬ http://127.0.0.1:4250/@denotest/module-graph2/1.4.0/mod.ts ([WILDCARD])
+ └── http://127.0.0.1:4250/@denotest/module-graph2/1.4.0/other.ts ([WILDCARD])
diff --git a/tests/specs/jsr/no_module_graph/main.out b/tests/specs/jsr/no_module_graph/main.out
index da9b67e11..1837c5c1c 100644
--- a/tests/specs/jsr/no_module_graph/main.out
+++ b/tests/specs/jsr/no_module_graph/main.out
@@ -1,6 +1,6 @@
-Download http://127.0.0.1:4250/@denotest/no_module_graph/meta.json
-Download http://127.0.0.1:4250/@denotest/no_module_graph/0.1.0_meta.json
-Download http://127.0.0.1:4250/@denotest/no_module_graph/0.1.0/mod.ts
-Download http://127.0.0.1:4250/@denotest/no_module_graph/0.1.0/TestClass.ts
+Download http://127.0.0.1:4250/@denotest/no-module-graph/meta.json
+Download http://127.0.0.1:4250/@denotest/no-module-graph/0.1.0_meta.json
+Download http://127.0.0.1:4250/@denotest/no-module-graph/0.1.0/mod.ts
+Download http://127.0.0.1:4250/@denotest/no-module-graph/0.1.0/TestClass.ts
0.1.0
TestClass {}
diff --git a/tests/specs/jsr/no_module_graph/main.ts b/tests/specs/jsr/no_module_graph/main.ts
index 6ea030c59..9d50eaab8 100644
--- a/tests/specs/jsr/no_module_graph/main.ts
+++ b/tests/specs/jsr/no_module_graph/main.ts
@@ -1,4 +1,4 @@
-import version, { TestClass } from "jsr:@denotest/no_module_graph@0.1.0";
+import version, { TestClass } from "jsr:@denotest/no-module-graph@0.1.0";
console.log(version);
console.log(new TestClass());
diff --git a/tests/specs/jsr/no_module_graph/main_info.out b/tests/specs/jsr/no_module_graph/main_info.out
index 0293e4120..45c97f77e 100644
--- a/tests/specs/jsr/no_module_graph/main_info.out
+++ b/tests/specs/jsr/no_module_graph/main_info.out
@@ -1,12 +1,12 @@
-Download http://127.0.0.1:4250/@denotest/no_module_graph/meta.json
-Download http://127.0.0.1:4250/@denotest/no_module_graph/0.1.0_meta.json
-Download http://127.0.0.1:4250/@denotest/no_module_graph/0.1.0/mod.ts
-Download http://127.0.0.1:4250/@denotest/no_module_graph/0.1.0/TestClass.ts
+Download http://127.0.0.1:4250/@denotest/no-module-graph/meta.json
+Download http://127.0.0.1:4250/@denotest/no-module-graph/0.1.0_meta.json
+Download http://127.0.0.1:4250/@denotest/no-module-graph/0.1.0/mod.ts
+Download http://127.0.0.1:4250/@denotest/no-module-graph/0.1.0/TestClass.ts
local: [WILDCARD]main.ts
type: TypeScript
dependencies: 2 unique
size: [WILDCARD]
file:///[WILDCARD]/jsr/no_module_graph/main.ts ([WILDCARD])
-└─┬ http://127.0.0.1:4250/@denotest/no_module_graph/0.1.0/mod.ts ([WILDCARD])
- └── http://127.0.0.1:4250/@denotest/no_module_graph/0.1.0/TestClass.ts ([WILDCARD])
+└─┬ http://127.0.0.1:4250/@denotest/no-module-graph/0.1.0/mod.ts ([WILDCARD])
+ └── http://127.0.0.1:4250/@denotest/no-module-graph/0.1.0/TestClass.ts ([WILDCARD])
diff --git a/tests/specs/jsr/no_module_graph/multiple.ts b/tests/specs/jsr/no_module_graph/multiple.ts
index 660ed8be6..9c7474a2c 100644
--- a/tests/specs/jsr/no_module_graph/multiple.ts
+++ b/tests/specs/jsr/no_module_graph/multiple.ts
@@ -1,5 +1,5 @@
-import version1 from "jsr:@denotest/no_module_graph@0.1.0";
-import version2 from "jsr:@denotest/no_module_graph@^0.2";
+import version1 from "jsr:@denotest/no-module-graph@0.1.0";
+import version2 from "jsr:@denotest/no-module-graph@^0.2";
console.log(version1);
console.log(version2);