From e256c4d11ddace7e53cf146383d2a1234ddd781e Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Thu, 25 Mar 2021 23:16:46 -0700 Subject: [PATCH] test: fix typeof comparison MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The typeof operator returns a string. Compare to the string 'undefined' and not the value undefined. PR-URL: https://github.com/nodejs/node/pull/37924 Reviewed-By: Antoine du Hamel Reviewed-By: Ruben Bridgewater Reviewed-By: Michaƫl Zasso Reviewed-By: Colin Ihrig Reviewed-By: James M Snell --- test/parallel/test-assert-calltracker-report.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/parallel/test-assert-calltracker-report.js b/test/parallel/test-assert-calltracker-report.js index 79186c88fd058b..64b068760ca720 100644 --- a/test/parallel/test-assert-calltracker-report.js +++ b/test/parallel/test-assert-calltracker-report.js @@ -19,7 +19,7 @@ callsfoo(); // Ensures that foo was removed from the callChecks array after being called the // expected number of times. -if (typeof tracker.report()[0] === undefined) { +if (typeof tracker.report()[0] === 'undefined') { process.exit(1); }