Skip to main content
๐Ÿ› Bug HuntQA Testing & QA Hardโšก+35 XP

Test Pollution

Tests pass individually but fail when run together.

๐Ÿ› Find the bug
1let data = [];
2test("adds item", () => { data.push(1); expect(data).toHaveLength(1); });
3test("empty check", () => { expect(data).toHaveLength(0); });
๐Ÿ› The bug is on line 1

๐Ÿ”ง Select the correct fix: