test: fix typeof comparison

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 <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>
This commit is contained in:
Rich Trott authored and Michaël Zasso committed 2021-05-01 12:25:29 +02:00
1 parent dd1c47bbf3
commit 7b0e4e23f2
1 file changed
+1 -1
@@ -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);
}