Skip to content

Commit 9b4e0fb

Browse files
authored
ci: add node v19 (#190)
1 parent ed44a67 commit 9b4e0fb

File tree

3 files changed

+11
-9
lines changed

3 files changed

+11
-9
lines changed

.github/workflows/nodejs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ jobs:
5959
strategy:
6060
matrix:
6161
os: [ubuntu-latest, windows-latest, macos-latest]
62-
node-version: [14.x, 16.x, 18.x]
62+
node-version: [14.x, 16.x, 18.x, 19.x]
6363
webpack-version: [latest]
6464

6565
runs-on: ${{ matrix.os }}

test/__snapshots__/loader.test.js.snap

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -810,13 +810,6 @@ exports[`source-map-loader should warn on invalid SourceMap: code 1`] = `
810810

811811
exports[`source-map-loader should warn on invalid SourceMap: errors 1`] = `[]`;
812812

813-
exports[`source-map-loader should warn on invalid SourceMap: warnings 1`] = `
814-
[
815-
"ModuleWarning: Module Warning (from \`replaced original path\`):
816-
Failed to parse source map from 'invalid-source-map.map': SyntaxError: Unexpected string in JSON at position 102",
817-
]
818-
`;
819-
820813
exports[`source-map-loader should warn on invalid base64 SourceMap: code 1`] = `
821814
"without SourceMap
822815
// @sourceMappingURL=data:application/source-map;base64,invalid/base64=

test/loader.test.js

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,16 @@ describe("source-map-loader", () => {
266266
});
267267
expect(codeFromBundle.map).toBeUndefined();
268268
expect(codeFromBundle.code).toMatchSnapshot("code");
269-
expect(getWarnings(stats)).toMatchSnapshot("warnings");
269+
270+
if (process.version.startsWith("v19")) {
271+
expect(getWarnings(stats)[0]).toContain(
272+
`SyntaxError: Unexpected non-whitespace character after JSON at position 102`
273+
);
274+
} else {
275+
expect(getWarnings(stats)[0]).toContain(
276+
`SyntaxError: Unexpected string in JSON at position 102`
277+
);
278+
}
270279
expect(getErrors(stats)).toMatchSnapshot("errors");
271280
});
272281

0 commit comments

Comments
 (0)