Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Add tests for #10470

  • Loading branch information...
commit 153e24186499e8259ca9f8d8a0b0103657c630f9 1 parent 7d3f54b
@gibson042 authored
Showing with 14 additions and 0 deletions.
  1. +14 −0 test/unit/manipulation.js
View
14 test/unit/manipulation.js
@@ -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();
+});
Please sign in to comment.
Something went wrong with that request. Please try again.