Permalink
Browse files

test: add regex check in test-vm-is-context

Use a regex to validate the error message.

PR-URL: #12785
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
  • Loading branch information...
Jeyanthinath authored and lpinca committed May 2, 2017
1 parent 53c88fa commit bc05436a891da91211c9bbcff08d43133558a1d6
Showing with 1 addition and 1 deletion.
  1. +1 −1 test/parallel/test-vm-is-context.js
@@ -26,7 +26,7 @@ const vm = require('vm');
assert.throws(function() {
vm.isContext('string is not supported');
}, TypeError);
}, /^TypeError: sandbox must be an object$/);
assert.strictEqual(vm.isContext({}), false);
assert.strictEqual(vm.isContext([]), false);

0 comments on commit bc05436

Please sign in to comment.