aboutsummaryrefslogtreecommitdiff
path: root/test/sandbox.js
diff options
context:
space:
mode:
authorAlex Lam S.L <alexlamsl@gmail.com>2021-03-07 20:25:56 +0000
committerGitHub <noreply@github.com>2021-03-08 04:25:56 +0800
commite4848a7f5a819f78515c487e64d46de3c3d2d743 (patch)
tree48e4bf839e9cea96e2dba625938e15a671d1b2ce /test/sandbox.js
parentf52b0e7c318ad5742bbe65f28d20334defdd68b4 (diff)
downloadtracifyjs-e4848a7f5a819f78515c487e64d46de3c3d2d743.tar.gz
tracifyjs-e4848a7f5a819f78515c487e64d46de3c3d2d743.zip
speed up `ufuzz` asynchronous testing (#4750)
Diffstat (limited to 'test/sandbox.js')
-rw-r--r--test/sandbox.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/test/sandbox.js b/test/sandbox.js
index bdce4188..18934f45 100644
--- a/test/sandbox.js
+++ b/test/sandbox.js
@@ -27,7 +27,7 @@ exports.run_code = semver.satisfies(process.version, "0.8") ? function(code, top
} : semver.satisfies(process.version, "<0.12") ? run_code_vm : function(code, toplevel, timeout) {
if ([
/\basync[ \t]*\([\s\S]*?\)[ \t]*=>/,
- /\b(async[ \t]+function|setInterval|setTimeout)\b/,
+ /\b(async[ \t]+function|setImmediate|setInterval|setTimeout)\b/,
/\basync([ \t]+|[ \t]*\*[ \t]*)[^\s()[\]{},.&|!~=*%/+-]+(\s*\(|[ \t]*=>)/,
].some(function(pattern) {
return pattern.test(code);
@@ -175,12 +175,14 @@ function setup(global, builtins, setup_log, setup_tty) {
[
// for Node.js v0.12
"Buffer",
+ "clearImmediate",
"clearInterval",
"clearTimeout",
// for Node.js v0.12
"DTRACE_NET_STREAM_END",
// for Node.js v8
"process",
+ "setImmediate",
"setInterval",
"setTimeout",
].forEach(function(name) {