summaryrefslogtreecommitdiff
path: root/tests/specs/npm
diff options
context:
space:
mode:
Diffstat (limited to 'tests/specs/npm')
-rw-r--r--tests/specs/npm/local_dir_no_duplicate_resolution/__test__.jsonc2
-rw-r--r--tests/specs/npm/local_dir_no_duplicate_resolution/main.out8
-rw-r--r--tests/specs/npm/local_dir_no_duplicate_resolution/run_main_sorted_lines.ts19
3 files changed, 24 insertions, 5 deletions
diff --git a/tests/specs/npm/local_dir_no_duplicate_resolution/__test__.jsonc b/tests/specs/npm/local_dir_no_duplicate_resolution/__test__.jsonc
index f7cc70f15..d7141c0bf 100644
--- a/tests/specs/npm/local_dir_no_duplicate_resolution/__test__.jsonc
+++ b/tests/specs/npm/local_dir_no_duplicate_resolution/__test__.jsonc
@@ -1,5 +1,5 @@
{
"tempDir": true,
- "args": "run -A --log-level=debug main.tsx",
+ "args": "run -A run_main_sorted_lines.ts",
"output": "main.out"
}
diff --git a/tests/specs/npm/local_dir_no_duplicate_resolution/main.out b/tests/specs/npm/local_dir_no_duplicate_resolution/main.out
index c2141bd7e..73aa13489 100644
--- a/tests/specs/npm/local_dir_no_duplicate_resolution/main.out
+++ b/tests/specs/npm/local_dir_no_duplicate_resolution/main.out
@@ -1,5 +1,5 @@
-[WILDCARD]Resolved preact from file:///[WILDLINE]/preact@10.19.6/node_modules/preact/jsx-runtime/dist/jsxRuntime.mjs to [WILDLINE]node_modules[WILDCHAR].deno[WILDCHAR]preact@10.19.6[WILDCHAR]node_modules[WILDCHAR]preact
-DEBUG RS - [WILDLINE] - Resolved preact from file:///[WILDLINE]/preact@10.19.6/node_modules/preact/hooks/dist/hooks.mjs to [WILDLINE]node_modules[WILDCHAR].deno[WILDCHAR]preact@10.19.6[WILDCHAR]node_modules[WILDCHAR]preact
[# ensure that preact is resolving to .deno/preact@10.19.6/node_modules/preact and not .deno/preact-render-to-string@6.4.0/node_modules/preact]
-DEBUG RS - [WILDLINE] - Resolved preact from file:///[WILDLINE]/preact-render-to-string@6.4.0/node_modules/preact-render-to-string/dist/index.mjs to [WILDLINE]node_modules[WILDCHAR].deno[WILDCHAR]preact@10.19.6[WILDCHAR]node_modules[WILDCHAR]preact
-[WILDCARD]
+[WILDCARD]/preact-render-to-string@6.4.0/node_modules/preact-render-to-string/dist/index.mjs to [WILDLINE]node_modules[WILDCHAR].deno[WILDCHAR]preact@10.19.6[WILDCHAR]node_modules[WILDCHAR]preact
+[WILDCARD]/preact@10.19.6/node_modules/preact/hooks/dist/hooks.mjs to [WILDLINE]node_modules[WILDCHAR].deno[WILDCHAR]preact@10.19.6[WILDCHAR]node_modules[WILDCHAR]preact
+[WILDCARD]/preact@10.19.6/node_modules/preact/jsx-runtime/dist/jsxRuntime.mjs to [WILDLINE]node_modules[WILDCHAR].deno[WILDCHAR]preact@10.19.6[WILDCHAR]node_modules[WILDCHAR]preact
+[WILDCARD] \ No newline at end of file
diff --git a/tests/specs/npm/local_dir_no_duplicate_resolution/run_main_sorted_lines.ts b/tests/specs/npm/local_dir_no_duplicate_resolution/run_main_sorted_lines.ts
new file mode 100644
index 000000000..54d460c29
--- /dev/null
+++ b/tests/specs/npm/local_dir_no_duplicate_resolution/run_main_sorted_lines.ts
@@ -0,0 +1,19 @@
+const { success, stderr } = new Deno.Command(
+ Deno.execPath(),
+ {
+ args: ["run", "-A", "--log-level=debug", "main.tsx"],
+ },
+).outputSync();
+const stderrText = new TextDecoder().decode(stderr);
+if (!success) {
+ console.error(stderrText);
+ throw new Error("Failed to run script.");
+}
+
+// create some stability with the output
+const lines = stderrText.split("\n")
+ .filter((line) => line.includes("Resolved preact from"));
+lines.sort();
+for (const line of lines) {
+ console.error(line);
+}