Skip to content
Permalink
Browse files

Adding in some more replaceWith tests for #5917.

  • Loading branch information
Neeraj Singh authored and jeresig committed Feb 2, 2010
1 parent 8660ea1 commit 532bec4c694532acbe2e14ad3b6ff72a4da90be0
Showing with 11 additions and 1 deletion.
  1. +11 −1 test/unit/manipulation.js
@@ -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);

0 comments on commit 532bec4

Please sign in to comment.
You can’t perform that action at this time.