Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitd96111e

Browse files
authored
Tests: Remove remaining obsolete jQuery.cache references
PRgh-4586 removed some of those but not all.Closesgh-4715Refgh-4586
1 parent1161196 commitd96111e

File tree

2 files changed

+3
-36
lines changed

2 files changed

+3
-36
lines changed

‎test/data/testrunner.js

Lines changed: 2 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,10 @@
22

33
"use strict";
44

5-
// Store the oldcounts so that we only assert on tests that have actually leaked,
5+
// Store the oldcount so that we only assert on tests that have actually leaked,
66
// instead of asserting every time a test has leaked sometime in the past
7-
varoldCacheLength=0,
8-
oldActive=0,
7+
varoldActive=0,
98

10-
expectedDataKeys={},
119
splice=[].splice,
1210
ajaxSettings=jQuery.ajaxSettings;
1311

@@ -26,11 +24,6 @@ QUnit.config.requireExpects = true;
2624
* teardown function on all modules' lifecycle object.
2725
*/
2826
window.moduleTeardown=function(assert){
29-
vari,expectedKeys,actualKeys,
30-
cacheLength=0;
31-
32-
// Reset data register
33-
expectedDataKeys={};
3427

3528
// Check for (and clean up, if possible) incomplete animations/requests/etc.
3629
if(jQuery.timers&&jQuery.timers.length!==0){
@@ -47,19 +40,6 @@ window.moduleTeardown = function( assert ) {
4740
}
4841

4942
Globals.cleanup();
50-
51-
for(iinjQuery.cache){
52-
++cacheLength;
53-
}
54-
55-
// Because QUnit doesn't have a mechanism for retrieving
56-
// the number of expected assertions for a test,
57-
// if we unconditionally assert any of these,
58-
// the test will fail with too many assertions :|
59-
if(cacheLength!==oldCacheLength){
60-
assert.equal(cacheLength,oldCacheLength,"No unit tests leak memory in jQuery.cache");
61-
oldCacheLength=cacheLength;
62-
}
6343
};
6444

6545
QUnit.done(function(){

‎test/unit/wrap.js

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ function manipulationFunctionReturningObj( value ) {
2121

2222
functiontestWrap(val,assert){
2323

24-
assert.expect(19);
24+
assert.expect(18);
2525

2626
vardefaultText,result,j,i,cacheLength;
2727

@@ -68,12 +68,6 @@ function testWrap( val, assert ) {
6868
"Check node,textnode,comment wraps doesn't hurt text"
6969
);
7070

71-
// Try wrapping a disconnected node
72-
cacheLength=0;
73-
for(iinjQuery.cache){
74-
cacheLength++;
75-
}
76-
7771
j=jQuery("<label></label>").wrap(val("<li></li>"));
7872
assert.equal(
7973
j[0].nodeName.toUpperCase(),"LABEL","Element is a label"
@@ -82,13 +76,6 @@ function testWrap( val, assert ) {
8276
j[0].parentNode.nodeName.toUpperCase(),"LI","Element has been wrapped"
8377
);
8478

85-
for(iinjQuery.cache){
86-
cacheLength--;
87-
}
88-
assert.equal(
89-
cacheLength,0,"No memory leak in jQuery.cache (bug #7165)"
90-
);
91-
9279
// Wrap an element containing a text node
9380
j=jQuery("<span></span>").wrap("<div>test</div>");
9481
assert.equal(

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp