Skip to content

Commit 508450a

Browse files
committed
add test case to verify that webpack/webpack-dev-server#1376 is fixed
1 parent 5c8a0d2 commit 508450a

File tree

6 files changed

+29
-0
lines changed

6 files changed

+29
-0
lines changed
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
it("should allow to run a WebAssembly module with imports", function() {
2+
return import("./wasm.wasm").then(function(wasm) {
3+
const result = wasm.get();
4+
switch(WATCH_STEP) {
5+
case "0":
6+
expect(result).toEqual(9);
7+
break;
8+
case "1":
9+
expect(result).toEqual(10);
10+
break;
11+
case "2":
12+
expect(result).toEqual(42);
13+
break;
14+
default:
15+
throw new Error("should not happen");
16+
}
17+
});
18+
});
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
export function getNumber() {
2+
return 8;
3+
}
102 Bytes
Binary file not shown.
102 Bytes
Binary file not shown.
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
export function getNumber() {
2+
return 40;
3+
}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
var supportsWebAssembly = require("../../../helpers/supportsWebAssembly");
2+
3+
module.exports = function(config) {
4+
return supportsWebAssembly();
5+
};

0 commit comments

Comments
 (0)