Allow disabling --debug in wasm-bindgen-test-runner

Afterwards remove the `non_debug` test as we're running the entire test suite in
non-debug mode!
This commit is contained in:
Alex Crichton
2018-08-06 09:57:41 -07:00
parent 3c52a82213
commit 6edf063c94
6 changed files with 11 additions and 50 deletions

View File

@@ -31,6 +31,10 @@ exports.js_strings = () => {
};
exports.js_exceptions = () => {
// this test only works when `--debug` is passed to `wasm-bindgen` (or the
// equivalent thereof)
if (require('process').env.WASM_BINDGEN_NO_DEBUG)
return;
assert.throws(() => new wasm.ClassesExceptions1(), /cannot invoke `new` directly/);
let a = wasm.ClassesExceptions1.new();
a.free();