本文整理汇总了TypeScript中@angular/core/testing/testing_internal.AsyncTestCompleter.done方法的典型用法代码示例。如果您正苦于以下问题:TypeScript AsyncTestCompleter.done方法的具体用法?TypeScript AsyncTestCompleter.done怎么用?TypeScript AsyncTestCompleter.done使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类@angular/core/testing/testing_internal.AsyncTestCompleter
的用法示例。
在下文中一共展示了AsyncTestCompleter.done方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: createExtension
createExtension().timeEnd('name1', 'name2').then((_) => {
expect(log).toEqual(
[['executeScript', `console.timeEnd('name1');console.time('name2');`]]);
async.done();
});
示例2: expect
PromiseWrapper.catchError(router.navigateByUrl('/cause-error'), (error) => {
expect(error).toContainError('oops!');
async.done();
});
示例3: expect
.then((_) => {
fixture.detectChanges();
expect(fixture.debugElement.nativeElement).toHaveText('hello brian');
async.done();
});
示例4: expect
PromiseWrapper.catchError(xhr.get(url404), (e) => {
expect(e).toEqual(`Failed to load ${url404}`);
async.done();
return null;
});
示例5: expect
next: (value: any) => {
expect(value).toEqual('new');
async.done();
}
示例6: createRunner
createRunner().sample({id: 'someId', execute: execute}).then((_) => {
expect(injector.get(Options.EXECUTE)).toEqual(execute);
async.done();
});
示例7: recognize
recognize(recognizer, '/profile/matsko?comments=all').then((solutions: RouteMatch[]) => {
expect(solutions.length).toBe(1);
expect(getParams(solutions[0])).toEqual({'name': 'matsko', 'comments': 'all'});
async.done();
});
示例8: expect
.then((_) => {
fixture.detectChanges();
expect(fixture.debugElement.nativeElement).toHaveText('activate cmp');
expect(log).toEqual(['activate: null -> /on-activate']);
async.done();
});