Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authormaurice_hayward <mauricehayward1@gmail.com>2017-02-28 00:37:05 +0300
committerAnna Henningsen <anna@addaleax.net>2017-03-06 01:28:40 +0300
commitb4dcb26681a240bf0741d54ec324d4239accd0c4 (patch)
tree8294b227c0d106b0d6a07d912ed3fd10cc70779a /test
parent039a1a97d80ad629ed31f2520125d0a0867018a4 (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.js2
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() {