Skip to content

Commit e256c4d

Browse files
Trottruyadorno
authored andcommitted
test: fix typeof comparison
The typeof operator returns a string. Compare to the string 'undefined' and not the value undefined. PR-URL: #37924 Reviewed-By: Antoine du Hamel <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: James M Snell <[email protected]>
1 parent 377830f commit e256c4d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

test/parallel/test-assert-calltracker-report.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ callsfoo();
1919

2020
// Ensures that foo was removed from the callChecks array after being called the
2121
// expected number of times.
22-
if (typeof tracker.report()[0] === undefined) {
22+
if (typeof tracker.report()[0] === 'undefined') {
2323
process.exit(1);
2424
}
2525

0 commit comments

Comments
 (0)