Skip to content

Commit

Permalink
revert to log
Browse files Browse the repository at this point in the history
  • Loading branch information
rluvaton committed Jul 26, 2023
1 parent 39c7dba commit 1a0b3b2
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions test/common/assertSnapshot.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,9 @@ async function assertSnapshot(actual, filename = process.argv[1]) {
expected = await fs.readFile(snapshot, 'utf8');
} catch (e) {
if (e.code === 'ENOENT') {
await fs.writeFile(snapshot, actual);
return;
console.log(
'Snapshot file does not exist. You can create a new one by running the test with NODE_REGENERATE_SNAPSHOTS=1',
);
}
throw e;
}
Expand Down

0 comments on commit 1a0b3b2

Please sign in to comment.