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