-
Notifications
You must be signed in to change notification settings - Fork 29.8k
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: increase coverage of vm #11377
Conversation
} | ||
|
||
assert.throws(() => { vm[method].apply(vm, args); }, | ||
/^Error: Script execution interrupted\.$/); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: How about
const script = `process.send('${method}'); while(true) {}`;
const options = { breakOnSigint: true };
assert.throws(vm[method](script, ...args, options);
(with args
kinda like above… you get the idea. 😄)
c96ab60
to
1d6d58d
Compare
@addaleax Updated, PTAL. (Since the latest testing-guide says " |
@DavidCai1993 This test doesn’t exist in v4.x and won’t ever be backported there, so you can feel completely free to use the spread operator. :) |
1d6d58d
to
49e6804
Compare
@addaleax OK, updated 👍 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks!
Landed in c7205ba, thanks for the PR! |
PR-URL: #11377 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
PR-URL: #11377 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Does not land cleanly on v4.x due to missing files. Backport PR would be needed |
PR-URL: #11377 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
PR-URL: #11377 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passesAffected core subsystem(s)
test