Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: changed test2 & test3 of test-vm-timeout.js #13453

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions test/parallel/test-vm-timeout.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,12 @@ assert.throws(function() {
// Test 2: Timeout must be >= 0ms
assert.throws(function() {
vm.runInThisContext('', { timeout: -1 });
}, RangeError);
}, /^RangeError: timeout must be a positive number$/);

// Test 3: Timeout of 0ms
assert.throws(function() {
vm.runInThisContext('', { timeout: 0 });
}, RangeError);
}, /^RangeError: timeout must be a positive number$/);

// Test 4: Timeout of 1000ms, script finishes first
vm.runInThisContext('', { timeout: 1000 });
Expand Down