This repository was archived by the owner on Feb 26, 2024. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -33,11 +33,8 @@ describe('setInterval', function () {
3333 // This icky replacer is to deal with Timers in node.js. The data.handleId contains timers in
3434 // node.js. They do not stringify properly since they contain circular references.
3535 id = JSON . stringify ( ( < MacroTask > cancelId ) . data , function replaceTimer ( key , value ) {
36- if ( value . _idleNext ) {
37- return '' ;
38- } else {
39- return value ;
40- }
36+ if ( key == 'handleId' && typeof value == 'object' ) return value . constructor . name ;
37+ return value ;
4138 } ) ;
4239 expect ( wtfMock . log ) . toEqual ( [
4340 '# Zone:fork("<root>::WTF", "TestZone")' ,
Original file line number Diff line number Diff line change @@ -29,11 +29,8 @@ describe('setTimeout', function () {
2929 // This icky replacer is to deal with Timers in node.js. The data.handleId contains timers in
3030 // node.js. They do not stringify properly since they contain circular references.
3131 id = JSON . stringify ( ( < MacroTask > cancelId ) . data , function replaceTimer ( key , value ) {
32- if ( value . _idleNext ) {
33- return '' ;
34- } else {
35- return value ;
36- }
32+ if ( key == 'handleId' && typeof value == 'object' ) return value . constructor . name ;
33+ return value ;
3734 } ) ;
3835 expect ( wtfMock . log ) . toEqual ( [
3936 '# Zone:fork("<root>::WTF", "TestZone")' ,
@@ -89,6 +86,8 @@ describe('setTimeout', function () {
8986 } ) ;
9087
9188 it ( 'should return the timeout Id through toString' , function ( ) {
89+ // Node returns complex object from setTimeout, ignore this test.
90+ if ( isNode ) return ;
9291 var cancelId = setTimeout ( ( ) => {
9392 } , 0 ) ;
9493 expect ( typeof ( cancelId . toString ( ) ) ) . toBe ( 'number' ) ;
You can’t perform that action at this time.
0 commit comments