license class SyncTestZoneSpec implements ZoneSpec { runZone = Zone . current ; constructor ( namePrefix ) { this . name = 'syncTestZone for ' + namePrefix ; } name : string ; onScheduleTask ( delegate , current , target , task ) { switch ( task . type ) { case 'microTask' : case 'macroTask' : throw new Error ( `Cannot call ${ task . source } from within a sync test.` ) ; case 'eventTask' : task = delegate . scheduleTask ( target , task ) ; break ; } return task ; } } ( Zone as any ) [ 'SyncTestZoneSpec' ] = SyncTestZoneSpec ;