From f843a7062fef5a262c244575712b8173ced7c1a2 Mon Sep 17 00:00:00 2001 From: Uri Gilad Date: Tue, 10 Jul 2012 10:14:43 -0400 Subject: Fix #10517. before() and after() on disconnected node should return multiple nodes. Closes gh-851. --- test/unit/manipulation.js | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'test') diff --git a/test/unit/manipulation.js b/test/unit/manipulation.js index 525c1387b..5d794b9bc 100644 --- a/test/unit/manipulation.js +++ b/test/unit/manipulation.js @@ -917,6 +917,13 @@ test("before and after w/ empty object (#10812)", function() { equal( res.wrapAll("
").parent().text(), "()", "correctly appended text" ); }); +test("before and after on disconnected node (#10517)", function() { + expect(2); + + equal( jQuery("").before("
").length, 2, "before() returned all elements" ); + equal( jQuery("").after("
").length, 2, "after() returned all elements" ); +}); + test("insertBefore(String|Element|Array<Element>|jQuery)", function() { expect(4); var expected = "This is a normal link: bugaYahoo"; -- cgit v1.2.3