Make sure that the correct context is being passed in for replaceWith(fn). Fixes #5798.
This commit is contained in:
parent
9f17e70ae9
commit
0b3165fd23
2 changed files with 16 additions and 0 deletions
|
@ -720,6 +720,16 @@ test("replaceWith(String|Element|Array<Element>|jQuery)", function() {
|
|||
|
||||
test("replaceWith(Function)", function() {
|
||||
testReplaceWith(functionReturningObj);
|
||||
|
||||
expect(16);
|
||||
|
||||
var y = jQuery("#yahoo")[0];
|
||||
|
||||
jQuery(y).replaceWith(function(){
|
||||
equals( this, y, "Make sure the context is coming in correctly." );
|
||||
});
|
||||
|
||||
reset();
|
||||
})
|
||||
|
||||
test("replaceAll(String|Element|Array<Element>|jQuery)", function() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue