Commit 17ce9edf authored by Timmy Willison's avatar Timmy Willison

Selector: add test for jQuery.unique() alias

parent d9d930f7
...@@ -386,7 +386,7 @@ test( "jQuery.contains", function() { ...@@ -386,7 +386,7 @@ test( "jQuery.contains", function() {
}); });
test("jQuery.uniqueSort", function() { test("jQuery.uniqueSort", function() {
expect( 14 ); expect( 15 );
function Arrayish( arr ) { function Arrayish( arr ) {
var i = this.length = arr.length; var i = this.length = arr.length;
...@@ -462,6 +462,8 @@ test("jQuery.uniqueSort", function() { ...@@ -462,6 +462,8 @@ test("jQuery.uniqueSort", function() {
deepEqual( jQuery.uniqueSort( test.input ).slice( 0, length ), test.expected, label + " (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)" ); deepEqual( jQuery.uniqueSort( new Arrayish(test.input) ).slice( 0, length ), test.expected, label + " (quasi-array)" );
}); });
strictEqual( jQuery.unique, jQuery.uniqueSort, "jQuery.unique() is an alias for jQuery.uniqueSort()" );
}); });
testIframe("selector/sizzle_cache", "Sizzle cache collides with multiple Sizzles on a page", function( jQuery, window, document ) { testIframe("selector/sizzle_cache", "Sizzle cache collides with multiple Sizzles on a page", function( jQuery, window, document ) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment