mirror of https://github.com/webpack/webpack.git
				
				
				
			run tests on Node.js 16
This commit is contained in:
		
							parent
							
								
									0abe3df1c6
								
							
						
					
					
						commit
						3ddadb2031
					
				|  | @ -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 }} | ||||
|  |  | |||
|  | @ -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: | ||||
|  |  | |||
|  | @ -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); | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue