Add a couple more tests for typeof

This commit is contained in:
Jarred Sumner
2022-11-08 15:27:55 -08:00
parent 2077e563b7
commit f17080df7f

View File

@@ -1543,6 +1543,10 @@ class Foo {
expectPrinted("typeof [null]", '"object"');
expectPrinted("typeof ['boolean']", '"object"');
expectPrinted('typeof [] === "object"', "true");
expectPrinted("typeof {foo: 123} === typeof {bar: 123}", "true");
expectPrinted("typeof {foo: 123} !== typeof 123", "true");
expectPrinted("undefined === undefined", "true");
expectPrinted("undefined !== undefined", "false");
expectPrinted("undefined == undefined", "true");