diff --git a/src/dev/build.ts b/src/dev/build.ts index 24cd639c..7780ec36 100644 --- a/src/dev/build.ts +++ b/src/dev/build.ts @@ -17,7 +17,7 @@ export async function build( const ctx = await ServerContext.fromManifest(manifest, { ...opts, - skipSnapshot: false, + skipSnapshot: true, }); // Bundle assets diff --git a/tests/build_test.ts b/tests/build_test.ts index 231700af..7a9de0e3 100644 --- a/tests/build_test.ts +++ b/tests/build_test.ts @@ -9,7 +9,7 @@ Deno.test("build snapshot and restore from it", async (t) => { try { await t.step("build snapshot", async () => { - await new Deno.Command(Deno.execPath(), { + const res = await new Deno.Command(Deno.execPath(), { args: [ "run", "-A", @@ -17,10 +17,17 @@ Deno.test("build snapshot and restore from it", async (t) => { "build", ], stdin: "null", - stdout: "inherit", + stdout: "piped", stderr: "inherit", }).output(); + const decoder = new TextDecoder(); + const stdout = decoder.decode(res.stdout); + assert( + !/Using snapshot found at/.test(stdout), + "Using snapshot message was shown during build", + ); + assert((await Deno.stat(outDir)).isDirectory, "Missing output directory"); });