From 147317f60c41acdd934c6da3868f442e05226e37 Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Wed, 4 Dec 2019 20:15:33 -0800 Subject: 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 Reviewed-By: Colin Ihrig Reviewed-By: Luigi Pinca Reviewed-By: James M Snell Reviewed-By: Trivikram Kamat --- test/wasi/test-wasi-options-validation.js | 6 +++--- 1 file 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/ }); -- cgit v1.2.3