fix: load snapshot message shown for build (#1640)
This commit is contained in:
+1
-1
@@ -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
@@ -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");
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user