From 887bd41abdd0f8e188d3dfc16c00e22f3ce722df Mon Sep 17 00:00:00 2001 From: zumbrunn Date: Tue, 10 Nov 2026 17:59:30 +0100 Subject: [PATCH] test: the scaffold closure test ignores the contract packages core's deno.json imports @dune/plugin-api and @dune/theme-api for the compat tests under tests/contract/ only; they are not runtime dependencies, like @std/assert, so a scaffolded site's import map does not need them. Without this the test fails as soon as either compat PR (#118, #119) adds its import. Co-Authored-By: Claude Sonnet 5.5 --- tests/cli/new_test.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/cli/new_test.ts b/tests/cli/new_test.ts index 8da45d1e..f3dbda85 100644 --- a/tests/cli/new_test.ts +++ b/tests/cli/new_test.ts @@ -97,8 +97,11 @@ Deno.test("dune new: import map includes dune-core's full runtime dependency clo await newCommand(dir); const denoJson = JSON.parse(await Deno.readTextFile(join(dir, "deno.json"))); const duneOwn = JSON.parse(await Deno.readTextFile(join("src", "..", "deno.json"))); + // Dev/test-only imports are not runtime dependencies: @std/assert, and the contract + // packages, which core only type-tests against (tests/contract/). + const testOnly = ["@std/assert", "@dune/plugin-api", "@dune/theme-api"]; const required = Object.keys(duneOwn.imports).filter( - (k) => k !== "@std/assert" && !k.startsWith("@dune/plugin-admin"), + (k) => !testOnly.includes(k) && !k.startsWith("@dune/plugin-admin"), ); const missing = required.filter((k) => !(k in denoJson.imports)); assertEquals(missing, []);