Update unit tests with a leak detection mechanism for the various jQuery globals and fix all leaks in the tests.
This commit is contained in:
parent
80af46e8ff
commit
e2941d5a98
15 changed files with 189 additions and 38 deletions
|
@ -301,6 +301,8 @@ test("data-* attributes", function() {
|
|||
div.data("attr", "internal").attr("data-attr", "external");
|
||||
equals( div.data("attr"), "internal", "Check for .data('attr') precedence (internal > external data-* attribute)" );
|
||||
|
||||
div.remove();
|
||||
|
||||
child.appendTo('#main');
|
||||
equals( child.data("myobj"), "old data", "Value accessed from data-* attribute");
|
||||
|
||||
|
@ -312,6 +314,8 @@ test("data-* attributes", function() {
|
|||
|
||||
var obj = child.data(), obj2 = dummy.data(), check = [ "myobj", "ignored", "other" ], num = 0, num2 = 0;
|
||||
|
||||
dummy.remove();
|
||||
|
||||
for ( var i = 0, l = check.length; i < l; i++ ) {
|
||||
ok( obj[ check[i] ], "Make sure data- property exists when calling data-." );
|
||||
ok( obj2[ check[i] ], "Make sure data- property exists when calling data-." );
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue