From f17080df7f9b76166cd71e920bbe3e3386bcba4c Mon Sep 17 00:00:00 2001 From: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com> Date: Tue, 8 Nov 2022 15:27:55 -0800 Subject: Add a couple more tests for `typeof` --- test/bun.js/transpiler.test.js | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'test') 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"); -- cgit v1.2.3