Skip to content

Commit

Permalink
Adding in some more replaceWith tests for #5917.
Browse files Browse the repository at this point in the history
  • Loading branch information
Neeraj Singh authored and jeresig committed Feb 2, 2010
1 parent 8660ea1 commit 532bec4
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion test/unit/manipulation.js
Expand Up @@ -736,7 +736,17 @@ test("replaceWith(Function)", function() {
});

reset();
})
});

test("replaceWith(string) for more than one element", function(){
expect(3);

equals(jQuery('#foo p').length, 3, 'ensuring that test data has not changed');

jQuery('#foo p').replaceWith('<span>bar</span>');
equals(jQuery('#foo span').length, 3, 'verify that all the three original element have been replaced');
equals(jQuery('#foo p').length, 0, 'verify that all the three original element have been replaced');
});

test("replaceAll(String|Element|Array&lt;Element&gt;|jQuery)", function() {
expect(10);
Expand Down

0 comments on commit 532bec4

Please sign in to comment.