This repository was archived by the owner on Mar 13, 2018. It is now read-only.
File tree 3 files changed +7
-4
lines changed
3 files changed +7
-4
lines changed Original file line number Diff line number Diff line change 15
15
( function ( global ) {
16
16
'use strict' ;
17
17
18
+ var testingExposeCycleCount = global . testingExposeCycleCount ;
19
+
18
20
// Detect and do basic sanity checking on Object/Array.observe.
19
21
function detectObjectObserve ( ) {
20
22
if ( typeof Object . observe !== 'function' ||
446
448
while ( cycles < MAX_DIRTY_CHECK_CYCLES && observer . check_ ( ) ) {
447
449
cycles ++ ;
448
450
}
449
- if ( global . testingExposeCycleCount )
451
+ if ( testingExposeCycleCount )
450
452
global . dirtyCheckCycleCount = cycles ;
451
453
452
454
return cycles > 0 ;
845
847
anyChanged = true ;
846
848
} while ( cycles < MAX_DIRTY_CHECK_CYCLES && anyChanged ) ;
847
849
848
- if ( global . testingExposeCycleCount )
850
+ if ( testingExposeCycleCount )
849
851
global . dirtyCheckCycleCount = cycles ;
850
852
851
853
runningMicrotaskCheckpoint = false ;
Original file line number Diff line number Diff line change 21
21
< link rel ="stylesheet " href ="../node_modules/mocha/mocha.css ">
22
22
< script src ="../node_modules/chai/chai.js "> </ script >
23
23
< script src ="../node_modules/mocha/mocha.js "> </ script >
24
+
25
+ < script > window . testingExposeCycleCount = true </ script >
24
26
< script src ="../src/observe.js "> </ script >
27
+
25
28
< script >
26
29
mocha . setup ( {
27
30
ui : 'tdd' ,
Original file line number Diff line number Diff line change @@ -16,8 +16,6 @@ var observer;
16
16
var callbackArgs = undefined ;
17
17
var callbackInvoked = false ;
18
18
19
- window . testingExposeCycleCount = true ;
20
-
21
19
function then ( fn ) {
22
20
setTimeout ( function ( ) {
23
21
Platform . performMicrotaskCheckpoint ( ) ;
You can’t perform that action at this time.
0 commit comments