Skip to content

Commit

Permalink
test(minifier): enable null comparison with bigint.
Browse files Browse the repository at this point in the history
  • Loading branch information
7086cmd committed Oct 3, 2024
1 parent 242a5a1 commit 120fdad
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions crates/oxc_minifier/src/ast_passes/peephole_fold_constants.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down Expand Up @@ -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");
Expand Down

0 comments on commit 120fdad

Please sign in to comment.