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 ruyadorno committed Mar 30, 2021
1 parent 377830f commit e256c4d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test/parallel/test-assert-calltracker-report.js
Original file line number Diff line number Diff line change
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 e256c4d

Please sign in to comment.