本文整理汇总了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'); }