From 3ddadb2031f2d8bb4a422c5d47292155f2d3f7b0 Mon Sep 17 00:00:00 2001 From: Tobias Koppers Date: Tue, 27 Apr 2021 11:43:25 +0200 Subject: [PATCH] run tests on Node.js 16 --- .github/workflows/test.yml | 10 +++++----- azure-pipelines.yml | 14 +++++++------- test/cases/wasm/table/index.js | 14 +++++++------- 3 files changed, 19 insertions(+), 19 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 0223101a0..fd2d2a126 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -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 @@ -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 @@ -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 @@ -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 }} diff --git a/azure-pipelines.yml b/azure-pipelines.yml index ec5901b8d..ba7955bed 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -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 @@ -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: @@ -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: @@ -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: diff --git a/test/cases/wasm/table/index.js b/test/cases/wasm/table/index.js index 4d3d85a3b..9f77a9850 100644 --- a/test/cases/wasm/table/index.js +++ b/test/cases/wasm/table/index.js @@ -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); @@ -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);