Skip to content

Commit

Permalink
test: fix typeof comparison
Browse files Browse the repository at this point in the history
The typeof operator returns a string. Compare to the string 'undefined'
and not the value undefined.

PR-URL: #37924
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
  • Loading branch information
Trott authored and targos committed May 1, 2021
1 parent dd1c47b commit 7b0e4e2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test/parallel/test-assert-calltracker-report.js
Expand Up @@ -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);
}

Expand Down

0 comments on commit 7b0e4e2

Please sign in to comment.