mirror of
https://github.com/jquery/jquery.git
synced 2026-01-24 13:38:27 -05:00
test runner: optimizing a test for speed.
This commit is contained in:
@@ -1576,14 +1576,17 @@ test("empty()", function() {
|
||||
|
||||
test("slice()", function() {
|
||||
expect(6);
|
||||
isSet( jQuery("#ap a").slice(1,2), q("groups"), "slice(1,2)" );
|
||||
isSet( jQuery("#ap a").slice(1), q("groups", "anchor1", "mark"), "slice(1)" );
|
||||
isSet( jQuery("#ap a").slice(0,3), q("google", "groups", "anchor1"), "slice(0,3)" );
|
||||
isSet( jQuery("#ap a").slice(-1), q("mark"), "slice(-1)" );
|
||||
|
||||
isSet( jQuery("#ap a").eq(1), q("groups"), "eq(1)" );
|
||||
|
||||
isSet( jQuery("#ap a").eq('1'), q("groups"), "eq('1')" );
|
||||
var $links = jQuery("#ap a");
|
||||
|
||||
isSet( $links.slice(1,2), q("groups"), "slice(1,2)" );
|
||||
isSet( $links.slice(1), q("groups", "anchor1", "mark"), "slice(1)" );
|
||||
isSet( $links.slice(0,3), q("google", "groups", "anchor1"), "slice(0,3)" );
|
||||
isSet( $links.slice(-1), q("mark"), "slice(-1)" );
|
||||
|
||||
isSet( $links.eq(1), q("groups"), "eq(1)" );
|
||||
|
||||
isSet( $links.eq('2'), q("anchor1"), "eq('2')" );
|
||||
});
|
||||
|
||||
test("map()", function() {
|
||||
|
||||
Reference in New Issue
Block a user