filter: Don't modify original terms when testing.

This commit is contained in:
Aman Agrawal 2024-01-08 10:56:26 +00:00 committed by Tim Abbott
parent d7cbe17773
commit 5b0d346dd9
1 changed files with 2 additions and 2 deletions

View File

@ -1499,8 +1499,8 @@ test("navbar_helpers", () => {
}
function test_redirect_url_with_search(test_case) {
test_case.terms.push({operator: "search", operand: "fizzbuzz"});
const filter = new Filter(test_case.terms);
const terms = [...test_case.terms, {operator: "search", operand: "fizzbuzz"}];
const filter = new Filter(terms);
assert.equal(filter.generate_redirect_url(), test_case.redirect_url_with_search);
}