Commit 532bec4c authored by Neeraj Singh's avatar Neeraj Singh Committed by jeresig

Adding in some more replaceWith tests for #5917.

parent 8660ea1a
...@@ -736,7 +736,17 @@ test("replaceWith(Function)", function() { ...@@ -736,7 +736,17 @@ test("replaceWith(Function)", function() {
}); });
reset(); 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() { test("replaceAll(String|Element|Array&lt;Element&gt;|jQuery)", function() {
expect(10); expect(10);
......
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