Skip to content

Commit 9343350

Browse files
committed
print snapshot mismatch on stdout
1 parent 5accf4e commit 9343350

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

tests/verify.ts

+6
Original file line numberDiff line numberDiff line change
@@ -237,6 +237,12 @@ export const ensureSnapshotMatches = (
237237
name: "Inspecting Snapshot",
238238
verify: async (_output: ExecuteOutput[]) => {
239239
const good = await checkSnapshot(file);
240+
if (!good) {
241+
console.log("output:");
242+
console.log(await Deno.readTextFile(file));
243+
console.log("snapshot:");
244+
console.log(await Deno.readTextFile(file + ".snapshot"));
245+
}
240246
assert(
241247
good,
242248
`Snapshot ${file}.snapshot doesn't match output`,

0 commit comments

Comments
 (0)