Skip to content

Commit

Permalink
Merge pull request #13239 from webpack/ci/node-16
Browse files Browse the repository at this point in the history
run tests on Node.js 16
  • Loading branch information
sokra committed Apr 28, 2021
2 parents f199f5d + 2bcf0c2 commit 24fa101
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 20 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
- name: Use Node.js
uses: actions/setup-node@v1
with:
node-version: 14.x
node-version: 16.x
- id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- uses: actions/cache@v1
Expand All @@ -43,7 +43,7 @@ jobs:
- name: Use Node.js
uses: actions/setup-node@v1
with:
node-version: 14.x
node-version: 16.x
- id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- uses: actions/cache@v1
Expand All @@ -66,7 +66,7 @@ jobs:
- name: Use Node.js
uses: actions/setup-node@v1
with:
node-version: 14.x
node-version: 16.x
- id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- uses: actions/cache@v1
Expand All @@ -93,10 +93,10 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
node-version: [10.x, 14.x]
node-version: [10.x, 16.x]
include:
- os: ubuntu-latest
node-version: 15.x
node-version: 14.x
- os: ubuntu-latest
node-version: 12.x
runs-on: ${{ matrix.os }}
Expand Down
14 changes: 7 additions & 7 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
steps:
- task: NodeTool@0
inputs:
versionSpec: "^14.0.0"
versionSpec: "^16.0.0"
displayName: "Install Node.js"
- script: |
curl -o- -L https://yarnpkg.com/install.sh | bash
Expand Down Expand Up @@ -111,8 +111,8 @@ jobs:
node_version: ^10.13.0
node-12:
node_version: ^12.4.0
node-14:
node_version: ^14.0.0
node-16:
node_version: ^16.0.0
steps:
- task: NodeTool@0
inputs:
Expand Down Expand Up @@ -161,8 +161,8 @@ jobs:
node_version: ^12.4.0
node-14:
node_version: ^14.0.0
node-15:
node_version: ^15.0.0
node-16:
node_version: ^16.0.0
steps:
- task: NodeTool@0
inputs:
Expand Down Expand Up @@ -212,8 +212,8 @@ jobs:
matrix:
node-12:
node_version: ^12.4.0
node-14:
node_version: ^14.0.0
node-16:
node_version: ^16.0.0
steps:
- task: NodeTool@0
inputs:
Expand Down
2 changes: 1 addition & 1 deletion test/cases/parsing/bom/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ it("should load a utf-8 file with BOM", function () {
});

it("should load a css file with BOM", function () {
var css = require("!css-loader!./bomfile.css").default + "";
var css = require("!css-loader?sourceMap=false!./bomfile.css").default + "";
expect(css).toBe("body{color:#abc}");
});

Expand Down
14 changes: 7 additions & 7 deletions test/cases/wasm/table/index.js
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
// the message is inconsistency between some nodejs versions
const UNKNOWN_FUNCTION_TABLE = /invalid index into function table|invalid function/;
const UNKNOWN_FUNCTION_TABLE = /table index is out of bounds|invalid index into function table|invalid function/;

it("should support tables", function() {
return import("./wasm-table.wat").then(function(wasm) {
it("should support tables", function () {
return import("./wasm-table.wat").then(function (wasm) {
expect(wasm.callByIndex(0)).toEqual(42);
expect(wasm.callByIndex(1)).toEqual(13);
expect(() => wasm.callByIndex(2)).toThrow(UNKNOWN_FUNCTION_TABLE);
});
});

it("should support exported tables", function() {
return import("./wasm-table-export.wat").then(function(wasm) {
it("should support exported tables", function () {
return import("./wasm-table-export.wat").then(function (wasm) {
expect(wasm.table).toBeInstanceOf(WebAssembly.Table);
expect(wasm.table.length).toBe(2);
const e0 = wasm.table.get(0);
Expand All @@ -22,8 +22,8 @@ it("should support exported tables", function() {
});
});

it("should support imported tables", function() {
return import("./wasm-table-imported.wat").then(function(wasm) {
it("should support imported tables", function () {
return import("./wasm-table-imported.wat").then(function (wasm) {
expect(wasm.callByIndex(0)).toEqual(42);
expect(wasm.callByIndex(1)).toEqual(13);
expect(() => wasm.callByIndex(2)).toThrow(UNKNOWN_FUNCTION_TABLE);
Expand Down

0 comments on commit 24fa101

Please sign in to comment.