Skip to content

Commit 6028076

Browse files
fix: load snapshot message shown for build (#1640)
1 parent 477364c commit 6028076

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

src/dev/build.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ export async function build(
1717

1818
const ctx = await ServerContext.fromManifest(manifest, {
1919
...opts,
20-
skipSnapshot: false,
20+
skipSnapshot: true,
2121
});
2222

2323
// Bundle assets

tests/build_test.ts

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,18 +9,25 @@ Deno.test("build snapshot and restore from it", async (t) => {
99

1010
try {
1111
await t.step("build snapshot", async () => {
12-
await new Deno.Command(Deno.execPath(), {
12+
const res = await new Deno.Command(Deno.execPath(), {
1313
args: [
1414
"run",
1515
"-A",
1616
path.join(fixture, "dev.ts"),
1717
"build",
1818
],
1919
stdin: "null",
20-
stdout: "inherit",
20+
stdout: "piped",
2121
stderr: "inherit",
2222
}).output();
2323

24+
const decoder = new TextDecoder();
25+
const stdout = decoder.decode(res.stdout);
26+
assert(
27+
!/Using snapshot found at/.test(stdout),
28+
"Using snapshot message was shown during build",
29+
);
30+
2431
assert((await Deno.stat(outDir)).isDirectory, "Missing output directory");
2532
});
2633

0 commit comments

Comments
 (0)