本文整理匯總了TypeScript中@angular/core/testing/testing_internal.AsyncTestCompleter類的典型用法代碼示例。如果您正苦於以下問題:TypeScript AsyncTestCompleter類的具體用法?TypeScript AsyncTestCompleter怎麽用?TypeScript AsyncTestCompleter使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
在下文中一共展示了AsyncTestCompleter類的7個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。
示例1: microTask
microTask(() => {
expect(execute).toHaveBeenCalled();
async.done();
});
示例2: macroTask
macroTask(() => {
expect(_log.result())
.toEqual('onUnstable; run; onMicrotaskEmpty; onStable; onMyTaskDone');
async.done();
});
示例3: expect
error: (err: any) => {
log.push(err);
expect(log).toEqual([1, 2, 3, 4]);
async.done();
}
示例4: expect
c.promise.then((_) => {
expect(_traces.length).toBe(1);
expect(_traces[0].length).toBeGreaterThan(1);
async.done();
});
示例5:
emitter.subscribe({next: () => {}, error: (_: any) => { async.done(); }});
示例6: expect
.then((_) => {
fixture.detectChanges();
expect(getHref(getLinkElement(fixture))).toEqual('/team/angular/user/matias');
async.done();
});
示例7: expectResponse
expectResponse(resourceLoader.get(url), url, 'when', () => async.done());