Skip to content

Commit 64cf136

Browse files
committed
test: mask node version in snapshots
1 parent 37e0692 commit 64cf136

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

test/__snapshots__/fixtures.test.ts.snap

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ Error: ParseError: \`import\` can only be used in \`import
2424
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main)
2525
at internal/main/run_main_module
2626
27-
Node.js v18.16.0"
27+
Node.js v<version>"
2828
`;
2929
3030
exports[`fixtures > error-parse > stdout 1`] = `""`;
@@ -50,7 +50,7 @@ TypeError: The \\"listener\\" argument must be of type function. Received undefi
5050
code: 'ERR_INVALID_ARG_TYPE'
5151
}
5252
53-
Node.js v18.16.0"
53+
Node.js v<version>"
5454
`;
5555
5656
exports[`fixtures > error-runtime > stdout 1`] = `""`;

test/fixtures.test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ describe("fixtures", async () => {
2929
.replace(/node:(internal|events)/g, "$1") // in Node 16 internal will be presented as node:internal
3030
.replace(/\.js\)/g, ")")
3131
.replace(/file:\/{3}/g, "file://")
32+
.replace(/Node.js v[0-9.]+/, "Node.js v<version>")
3233
.replace(/ParseError: \w:\/:\s+/, "ParseError: ") // Unknown chars in Windows
3334
.trim();
3435
}

0 commit comments

Comments
 (0)