From fcb4651819de5940fd4bf3f0e81c3aff4cf425d3 Mon Sep 17 00:00:00 2001 From: 7086cmd <54303040+7086cmd@users.noreply.github.com> Date: Thu, 3 Oct 2024 12:16:09 +0000 Subject: [PATCH] test(minifier): enable null comparison with bigint. (#6252) --- .../src/ast_passes/peephole_fold_constants.rs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/crates/oxc_minifier/src/ast_passes/peephole_fold_constants.rs b/crates/oxc_minifier/src/ast_passes/peephole_fold_constants.rs index fa9bd7af8ec88..e9f846b1adc02 100644 --- a/crates/oxc_minifier/src/ast_passes/peephole_fold_constants.rs +++ b/crates/oxc_minifier/src/ast_passes/peephole_fold_constants.rs @@ -1004,8 +1004,8 @@ mod test { test("null == 0", "false"); test("null == 1", "false"); - // test("null == 0n", "false"); - // test("null == 1n", "false"); + test("null == 0n", "false"); + test("null == 1n", "false"); test("null == 'hi'", "false"); test("null == true", "false"); test("null == false", "false"); @@ -1045,16 +1045,16 @@ mod test { test("0 < null", "false"); test("0 > null", "false"); test("0 >= null", "true"); - // test("0n < null", "false"); - // test("0n > null", "false"); - // test("0n >= null", "true"); + test("0n < null", "false"); + test("0n > null", "false"); + test("0n >= null", "true"); test("true > null", "true"); test("'hi' < null", "false"); test("'hi' >= null", "false"); test("null <= null", "true"); test("null < 0", "false"); - // test("null < 0n", "false"); + test("null < 0n", "false"); test("null > true", "false"); test("null < 'hi'", "false"); test("null >= 'hi'", "false");