| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 4198d9a commit 1d45ba3
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -20,3 +20,9 @@ assert.throws(() => { new WASI({ env: 'fhqwhgads' }); }, | |||
| 20 | 20 | // If preopens is not an Object and not undefined, it should throw. | |
| 21 | 21 | assert.throws(() => { new WASI({ preopens: 'fhqwhgads' }); }, | |
| 22 | 22 | { code: 'ERR_INVALID_ARG_TYPE', message: /\bpreopens\b/ }); | |
| 23 | + | ||
| 24 | + // If options is provided, but not an object, the constructor should throw. | ||
| 25 | + [null, 'foo', '', 0, NaN, Symbol(), true, false, () => {}].forEach((value) => { | ||
| 26 | + assert.throws(() => { new WASI(value); }, | ||
| 27 | + { code: 'ERR_INVALID_ARG_TYPE' }); | ||
| 28 | + }); | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments