fix: load snapshot message shown for build (#1640)

This commit is contained in:
Marvin Hagemeister
2023-08-16 17:30:30 +02:00
committed by GitHub
parent 477364c567
commit 602807686a
2 changed files with 10 additions and 3 deletions
+1 -1
View File
@@ -17,7 +17,7 @@ export async function build(
const ctx = await ServerContext.fromManifest(manifest, { const ctx = await ServerContext.fromManifest(manifest, {
...opts, ...opts,
skipSnapshot: false, skipSnapshot: true,
}); });
// Bundle assets // Bundle assets
+9 -2
View File
@@ -9,7 +9,7 @@ Deno.test("build snapshot and restore from it", async (t) => {
try { try {
await t.step("build snapshot", async () => { await t.step("build snapshot", async () => {
await new Deno.Command(Deno.execPath(), { const res = await new Deno.Command(Deno.execPath(), {
args: [ args: [
"run", "run",
"-A", "-A",
@@ -17,10 +17,17 @@ Deno.test("build snapshot and restore from it", async (t) => {
"build", "build",
], ],
stdin: "null", stdin: "null",
stdout: "inherit", stdout: "piped",
stderr: "inherit", stderr: "inherit",
}).output(); }).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"); assert((await Deno.stat(outDir)).isDirectory, "Missing output directory");
}); });