Skip to content

Commit bb8b11f

Browse files
Trotttargos
authored andcommitted
test: improve WASI options validation
Refs: https://github.com/nodejs/node/pull/30770/files#r353051438 PR-URL: #30800 Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Trivikram Kamat <[email protected]>
1 parent 2c27df2 commit bb8b11f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

test/wasi/test-wasi-options-validation.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,12 @@ new WASI({});
1111

1212
// If args is not an Array and not undefined, it should throw.
1313
assert.throws(() => { new WASI({ args: 'fhqwhgads' }); },
14-
{ code: 'ERR_INVALID_ARG_TYPE' });
14+
{ code: 'ERR_INVALID_ARG_TYPE', message: /\bargs\b/ });
1515

1616
// If env is not an Object and not undefined, it should throw.
1717
assert.throws(() => { new WASI({ env: 'fhqwhgads' }); },
18-
{ code: 'ERR_INVALID_ARG_TYPE' });
18+
{ code: 'ERR_INVALID_ARG_TYPE', message: /\benv\b/ });
1919

2020
// If preopens is not an Object and not undefined, it should throw.
2121
assert.throws(() => { new WASI({ preopens: 'fhqwhgads' }); },
22-
{ code: 'ERR_INVALID_ARG_TYPE' });
22+
{ code: 'ERR_INVALID_ARG_TYPE', message: /\bpreopens\b/ });

0 commit comments

Comments
 (0)