本文整理匯總了TypeScript中@angular/core/testing/src/testing_internal.Log類的典型用法代碼示例。如果您正苦於以下問題:TypeScript Log類的具體用法?TypeScript Log怎麽用?TypeScript Log使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
在下文中一共展示了Log類的8個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。
示例1: ngOnInit
ngOnInit() { this._log.add('ngOnInit'); }
示例2:
next: () => {
_log.add('onMicrotaskEmpty:started');
_zone.run(() => _log.add('nested run'));
_log.add('onMicrotaskEmpty:finished');
}
示例3: macroTask
macroTask(() => {
expect(_log.result())
.toEqual(
'onUnstable; start run; onMicrotaskEmpty; onMicrotaskEmpty:started; nested run; onMicrotaskEmpty:finished; onStable');
async.done();
}, resultTimer);
示例4: logOnUnstable
function logOnUnstable() {
_zone.onUnstable.subscribe({next: _log.fn('onUnstable')});
}
示例5: scheduleMicroTask
next: () => {
_log.add('onMyMicrotaskEmpty');
if (turnDone) return;
_zone.run(() => { scheduleMicroTask(() => {}); });
turnDone = true;
}
示例6: setTimeout
setTimeout(() => log.add('timer'), 9);
示例7: setInterval
const id = setInterval(() => log.add('periodic timer'), 10);
示例8: ngAfterViewInit
ngAfterViewInit() { this._log.add('ngAfterViewInit'); }