From 03e6152b5ba2cfe353a66e72a33a83ec75a0bcd9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Go=C5=82=C4=99biowski-Owczarek?= Date: Sun, 11 Sep 2022 23:59:58 +0200 Subject: [PATCH] Tests: Run `Sizzle.uniqueSort` on a copy of an input Avoid modifying input in the first `Sizze.uniqueSort` test by ensuring a copy of the test input is provided. --- test/unit/utilities.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/unit/utilities.js b/test/unit/utilities.js index 99a58572..2a53e89f 100644 --- a/test/unit/utilities.js +++ b/test/unit/utilities.js @@ -338,7 +338,7 @@ QUnit.test( "Sizzle.uniqueSort", function( assert ) { jQuery.each( tests, function( label, test ) { var length = test.length || test.input.length; assert.deepEqual( - Sizzle.uniqueSort( test.input ).slice( 0, length ), + Sizzle.uniqueSort( test.input.slice( 0 ) ).slice( 0, length ), test.expected, label + " (array)" );