Skip to content

Commit a43aa0e

Browse files
moe-dizzleMylesBorins
authored andcommitted
test: changed test1 of test-vm-timeout.js
test: changed test1 of test-vm-timeout.js so that entire error message would be matched in assert.throw. Before test 1 of test-vm-timeout.js would match any error, now it looks specifically for the error message "Script execution timed out." PR-URL: #11590 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Colin Ihrig <[email protected]>
1 parent 1035967 commit a43aa0e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

test/parallel/test-vm-timeout.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ const vm = require('vm');
66
// Test 1: Timeout of 100ms executing endless loop
77
assert.throws(function() {
88
vm.runInThisContext('while(true) {}', { timeout: 100 });
9-
});
9+
}, /^Error: Script execution timed out\.$/);
1010

1111
// Test 2: Timeout must be >= 0ms
1212
assert.throws(function() {

0 commit comments

Comments
 (0)