From 591521b310d909f08cec99d32cb2cc44ef602054 Mon Sep 17 00:00:00 2001 From: Tobias Koppers Date: Mon, 4 Jun 2018 18:27:19 +0200 Subject: [PATCH] support node.js 10 and 8 --- test/cases/wasm/js-incompatible-type/index.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/test/cases/wasm/js-incompatible-type/index.js b/test/cases/wasm/js-incompatible-type/index.js index 436fadded37..f5258dc4277 100644 --- a/test/cases/wasm/js-incompatible-type/index.js +++ b/test/cases/wasm/js-incompatible-type/index.js @@ -1,15 +1,17 @@ +const errorRegex = /wasm function signature contains illegal type|invalid type/; + it("should disallow exporting a func signature with result i64", function() { return import("./export-i64-result").then(({a}) => { - expect(() => a()).toThrow(/invalid type/); + expect(() => a()).toThrow(errorRegex); }); }); it("should disallow exporting a func signature with param i64", function() { return import("./export-i64-param").then(({a}) => { - expect(() => a()).toThrow(/invalid type/); + expect(() => a()).toThrow(errorRegex); }); }); it("should disallow importing a value type of i64", function() { - return expect(import("./import-i64.wat")).rejects.toThrow(/invalid type/); + return expect(import("./import-i64.wat")).rejects.toThrow(errorRegex); });