summaryrefslogtreecommitdiff
path: root/test/parallel/test-global-console-exists.js
diff options
context:
space:
mode:
Diffstat (limited to 'test/parallel/test-global-console-exists.js')
-rw-r--r--test/parallel/test-global-console-exists.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/parallel/test-global-console-exists.js b/test/parallel/test-global-console-exists.js
index 425eac077a..29b92f8481 100644
--- a/test/parallel/test-global-console-exists.js
+++ b/test/parallel/test-global-console-exists.js
@@ -11,7 +11,7 @@ const leakWarning = /EventEmitter memory leak detected\. 2 hello listeners/;
common.hijackStderr(common.mustCall(function(data) {
if (process.stderr.writeTimes === 0) {
- assert.ok(data.match(leakWarning));
+ assert.ok(leakWarning.test(data));
} else {
assert.fail('stderr.write should be called only once');
}