diff options
author | maurice_hayward <mauricehayward1@gmail.com> | 2017-02-28 00:37:05 +0300 |
---|---|---|
committer | Anna Henningsen <anna@addaleax.net> | 2017-03-06 01:28:40 +0300 |
commit | b4dcb26681a240bf0741d54ec324d4239accd0c4 (patch) | |
tree | 8294b227c0d106b0d6a07d912ed3fd10cc70779a /test | |
parent | 039a1a97d80ad629ed31f2520125d0a0867018a4 (diff) |
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: https://github.com/nodejs/node/pull/11590
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Diffstat (limited to 'test')
-rw-r--r-- | test/parallel/test-vm-timeout.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/test/parallel/test-vm-timeout.js b/test/parallel/test-vm-timeout.js index 5260ca7dc28..6ed73f8b4ff 100644 --- a/test/parallel/test-vm-timeout.js +++ b/test/parallel/test-vm-timeout.js @@ -6,7 +6,7 @@ const vm = require('vm'); // Test 1: Timeout of 100ms executing endless loop assert.throws(function() { vm.runInThisContext('while(true) {}', { timeout: 100 }); -}); +}, /^Error: Script execution timed out\.$/); // Test 2: Timeout must be >= 0ms assert.throws(function() { |