Better fix for equality of typeof ... against "undefined"
This commit is contained in:
@@ -3,7 +3,7 @@ typeof_eq_undefined: {
|
||||
comparisons: true
|
||||
};
|
||||
input: { a = typeof b.c != "undefined" }
|
||||
expect: { a = typeof b.c != "undefined" }
|
||||
expect: { a = "undefined" != typeof b.c }
|
||||
}
|
||||
|
||||
typeof_eq_undefined_unsafe: {
|
||||
@@ -12,5 +12,14 @@ typeof_eq_undefined_unsafe: {
|
||||
unsafe: true
|
||||
};
|
||||
input: { a = typeof b.c != "undefined" }
|
||||
expect: { a = b.c !== void 0 }
|
||||
expect: { a = void 0 !== b.c }
|
||||
}
|
||||
|
||||
typeof_eq_undefined_unsafe2: {
|
||||
options = {
|
||||
comparisons: true,
|
||||
unsafe: true
|
||||
};
|
||||
input: { a = "undefined" != typeof b.c }
|
||||
expect: { a = void 0 !== b.c }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user