diff options
author | Rich Trott <rtrott@gmail.com> | 2019-12-04 20:15:33 -0800 |
---|---|---|
committer | Rich Trott <rtrott@gmail.com> | 2019-12-07 09:02:59 -0800 |
commit | 147317f60c41acdd934c6da3868f442e05226e37 (patch) | |
tree | 82c26d9fd7bbd30a6f111bf1a73f74aad302b6e3 /test/wasi/test-wasi-options-validation.js | |
parent | cf5ce2c9e1aab5eadbae107c697fdd11c6fb93a9 (diff) | |
download | android-node-v8-147317f60c41acdd934c6da3868f442e05226e37.tar.gz android-node-v8-147317f60c41acdd934c6da3868f442e05226e37.tar.bz2 android-node-v8-147317f60c41acdd934c6da3868f442e05226e37.zip |
test: improve WASI options validation
Refs: https://github.com/nodejs/node/pull/30770/files#r353051438
PR-URL: https://github.com/nodejs/node/pull/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>
Diffstat (limited to 'test/wasi/test-wasi-options-validation.js')
-rw-r--r-- | test/wasi/test-wasi-options-validation.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/test/wasi/test-wasi-options-validation.js b/test/wasi/test-wasi-options-validation.js index 34ab7e078f..f8ec2604d5 100644 --- a/test/wasi/test-wasi-options-validation.js +++ b/test/wasi/test-wasi-options-validation.js @@ -11,12 +11,12 @@ new WASI({}); // If args is not an Array and not undefined, it should throw. assert.throws(() => { new WASI({ args: 'fhqwhgads' }); }, - { code: 'ERR_INVALID_ARG_TYPE' }); + { code: 'ERR_INVALID_ARG_TYPE', message: /\bargs\b/ }); // If env is not an Object and not undefined, it should throw. assert.throws(() => { new WASI({ env: 'fhqwhgads' }); }, - { code: 'ERR_INVALID_ARG_TYPE' }); + { code: 'ERR_INVALID_ARG_TYPE', message: /\benv\b/ }); // If preopens is not an Object and not undefined, it should throw. assert.throws(() => { new WASI({ preopens: 'fhqwhgads' }); }, - { code: 'ERR_INVALID_ARG_TYPE' }); + { code: 'ERR_INVALID_ARG_TYPE', message: /\bpreopens\b/ }); |