aboutsummaryrefslogtreecommitdiff
path: root/test/bun.js
diff options
context:
space:
mode:
authorGravatar Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com> 2022-11-08 15:27:55 -0800
committerGravatar Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com> 2022-11-08 15:27:55 -0800
commitf17080df7f9b76166cd71e920bbe3e3386bcba4c (patch)
treeb0f397380f57def8cbd311955cdfb1503b45ca41 /test/bun.js
parent2077e563b7bc8882ec834a5442aa4feb40760893 (diff)
downloadbun-f17080df7f9b76166cd71e920bbe3e3386bcba4c.tar.gz
bun-f17080df7f9b76166cd71e920bbe3e3386bcba4c.tar.zst
bun-f17080df7f9b76166cd71e920bbe3e3386bcba4c.zip
Add a couple more tests for `typeof`
Diffstat (limited to 'test/bun.js')
-rw-r--r--test/bun.js/transpiler.test.js4
1 files changed, 4 insertions, 0 deletions
diff --git a/test/bun.js/transpiler.test.js b/test/bun.js/transpiler.test.js
index 3f668a435..179097144 100644
--- a/test/bun.js/transpiler.test.js
+++ b/test/bun.js/transpiler.test.js
@@ -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");