本文整理匯總了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();
});