summaryrefslogtreecommitdiff
path: root/tests/specs/jsr/module_graph2
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/jsr/module_graph2
parent67d00fb1e37c7e2de55ab2aa376a5e57009fb2a9 (diff)
chore: add tests for moduleGraph2 (#23603)
Also did some renames from underscores to hyphens
Diffstat (limited to 'tests/specs/jsr/module_graph2')
-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
4 files changed, 32 insertions, 0 deletions
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])