diff options
author | Timmy Willison <timmywillisn@gmail.com> | 2015-05-04 15:27:12 -0700 |
---|---|---|
committer | Timmy Willison <timmywillisn@gmail.com> | 2015-05-04 15:27:12 -0700 |
commit | e1090c3d2b2a988a5b41f1f1ed9f8d6dcae02200 (patch) | |
tree | 713ef04318030185d6dba550c71c8dbaec6f5486 /test/unit | |
parent | 7a6931de689865f559bed26e797e8cbb5674bbce (diff) | |
download | jquery-e1090c3d2b2a988a5b41f1f1ed9f8d6dcae02200.tar.gz jquery-e1090c3d2b2a988a5b41f1f1ed9f8d6dcae02200.zip |
Selector: add jQuery.uniqueSort; deprecate jQuery.unique
Fixes gh-2228
Diffstat (limited to 'test/unit')
-rw-r--r-- | test/unit/selector.js | 6 | ||||
-rw-r--r-- | test/unit/traversing.js | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/test/unit/selector.js b/test/unit/selector.js index 12c26f1cb..ee117ca8f 100644 --- a/test/unit/selector.js +++ b/test/unit/selector.js @@ -386,7 +386,7 @@ test( "jQuery.contains", function() { ok( !jQuery.contains(document, detached), "document container (negative)" ); }); -test("jQuery.unique", function() { +test("jQuery.uniqueSort", function() { expect( 14 ); function Arrayish( arr ) { @@ -460,8 +460,8 @@ test("jQuery.unique", function() { jQuery.each( tests, function( label, test ) { var length = test.length || test.input.length; - deepEqual( jQuery.unique( test.input ).slice( 0, length ), test.expected, label + " (array)" ); - deepEqual( jQuery.unique( new Arrayish(test.input) ).slice( 0, length ), test.expected, label + " (quasi-array)" ); + deepEqual( jQuery.uniqueSort( test.input ).slice( 0, length ), test.expected, label + " (array)" ); + deepEqual( jQuery.uniqueSort( new Arrayish(test.input) ).slice( 0, length ), test.expected, label + " (quasi-array)" ); }); }); diff --git a/test/unit/traversing.js b/test/unit/traversing.js index b80b673ff..08b384a7e 100644 --- a/test/unit/traversing.js +++ b/test/unit/traversing.js @@ -696,7 +696,7 @@ test("sort direction", function() { jQuery.each( methodDirections, function( method, reversed ) { var actual = elems[ method ]().get(), - forward = jQuery.unique( [].concat( actual ) ); + forward = jQuery.uniqueSort( [].concat( actual ) ); deepEqual( actual, reversed ? forward.reverse() : forward, "Correct sort direction for " + method ); }); }); |