Skip to content

Commit d744f22

Browse files
committed
update test
1 parent b70e31e commit d744f22

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

crates/oxc_minifier/src/peephole/fold_constants.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1212,8 +1212,8 @@ mod test {
12121212
fold("a=+['0x10']", "a=16");
12131213
fold("a=+[[]]", "a=0");
12141214
fold("a=+[0, 1]", "a=NaN");
1215-
fold_same("a=+[0, ...foo]"); // can be either `a=0` or `a=NaN`
1216-
fold("a=+[0, ...foo, 1]", "a=NaN");
1215+
test_same("var foo; NOOP(a=+[0, ...foo])"); // can be either `a=0` or `a=NaN` (also `...foo` may have a side effect)
1216+
test("var foo; NOOP(a=+[0, ...[foo ? 'foo': ''], 1])", "var foo; NOOP(a=NaN)");
12171217
}
12181218

12191219
#[test]

0 commit comments

Comments
 (0)