Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Tests: Remove one of the checks for memory leak

This check is redundant since jQuery.fragments object does not exist anymore
  • Loading branch information...
commit 38c122a73a843a0d117d4f962cc94fda6f553086 1 parent 710d236
Oleg Gaidarenko markelog authored

Showing 1 changed file with 0 additions and 12 deletions. Show diff stats Hide diff stats

  1. +0 12 test/data/testrunner.js
12 test/data/testrunner.js
@@ -7,7 +7,6 @@ var oldStart = window.start,
7 7 // Store the old counts so that we only assert on tests that have actually leaked,
8 8 // instead of asserting every time a test has leaked sometime in the past
9 9 oldCacheLength = 0,
10   - oldFragmentsLength = 0,
11 10 oldActive = 0,
12 11
13 12 expectedDataKeys = {},
@@ -117,7 +116,6 @@ QUnit.config.urlConfig.push({
117 116 window.moduleTeardown = function() {
118 117 var i,
119 118 expectedKeys, actualKeys,
120   - fragmentsLength = 0,
121 119 cacheLength = 0;
122 120
123 121 // Only look for jQuery data problems if this test actually
@@ -161,22 +159,12 @@ window.moduleTeardown = function() {
161 159 ++cacheLength;
162 160 }
163 161
164   - jQuery.fragments = {};
165   -
166   - for ( i in jQuery.fragments ) {
167   - ++fragmentsLength;
168   - }
169   -
170 162 // Because QUnit doesn't have a mechanism for retrieving the number of expected assertions for a test,
171 163 // if we unconditionally assert any of these, the test will fail with too many assertions :|
172 164 if ( cacheLength !== oldCacheLength ) {
173 165 equal( cacheLength, oldCacheLength, "No unit tests leak memory in jQuery.cache" );
174 166 oldCacheLength = cacheLength;
175 167 }
176   - if ( fragmentsLength !== oldFragmentsLength ) {
177   - equal( fragmentsLength, oldFragmentsLength, "No unit tests leak memory in jQuery.fragments" );
178   - oldFragmentsLength = fragmentsLength;
179   - }
180 168 };
181 169
182 170 QUnit.done(function() {

0 comments on commit 38c122a

Please sign in to comment.
Something went wrong with that request. Please try again.