Permalink
Browse files

Add tests for #10470

  • Loading branch information...
1 parent 7d3f54b commit 153e24186499e8259ca9f8d8a0b0103657c630f9 @gibson042 committed Oct 31, 2012
Showing with 14 additions and 0 deletions.
  1. +14 −0 test/unit/manipulation.js
View
@@ -2129,3 +2129,17 @@ test("script evaluation (#11795)", function() {
deepEqual( fixture.find("> script").get(), scriptsOut.get(), "Scripts detached without reevaluation" );
objGlobal.ok = isOk;
});
+
+test("wrapping scripts (#10470)", function() {
+ expect(2);
+
+ var script = document.createElement("script");
+ script.text = script.textContent =
+ "ok( !document.eval10470, 'script evaluated once' ); document.eval10470 = true;";
+
+ document.eval10470 = false;
+ jQuery("#qunit-fixture").empty()[0].appendChild( script );
+ jQuery("#qunit-fixture script").wrap("<b></b>");
+ strictEqual( script.parentNode, jQuery("#qunit-fixture > b")[0], "correctly wrapped" );
+ jQuery( script ).remove();
+});

0 comments on commit 153e241

Please sign in to comment.