Skip to content

Commit 25e3696

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 <ruben@bridgewater.de> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
1 parent 1ed1a64 commit 25e3696

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

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

Lines changed: 3 additions & 3 deletions
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(()=>{newWASI({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(()=>{newWASI({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(()=>{newWASI({preopens: 'fhqwhgads'});},
22-
{code: 'ERR_INVALID_ARG_TYPE'});
22+
{code: 'ERR_INVALID_ARG_TYPE',message: /\bpreopens\b/});

0 commit comments

Comments
 (0)