docs(API): 翻译完了 test/async
This commit is contained in:
parent
9e40bf8e63
commit
d589eef668
|
@ -96,10 +96,9 @@
|
|||
[x] | forms/NgSelectOption | 0.17
|
||||
[x] | common/PercentPipe | 0.17
|
||||
[x] | forms/ValidatorFn | 0.17
|
||||
[ ] | http/RequestOptionsArgs | 0.17
|
||||
[ ] | animations/animation | 0.17
|
||||
[x] | common/NgSwitchCase | 0.16
|
||||
[ ] | core/testing/async | 0.16
|
||||
[x] | core/testing/async | 0.16
|
||||
|
||||
## 翻译方式
|
||||
|
||||
|
|
|
@ -13,8 +13,13 @@ import {asyncFallback} from './async_fallback';
|
|||
* complete when all asynchronous calls within this zone are done. Can be used
|
||||
* to wrap an {@link inject} call.
|
||||
*
|
||||
* 把一个测试函数包装进一个异步测试区域(Zone)。当该区域中的所有异步调用都已完成时,该测试将会自动完成。
|
||||
* 可用于包装 {@link inject} 调用。
|
||||
*
|
||||
* Example:
|
||||
*
|
||||
* 例子:
|
||||
*
|
||||
* ```
|
||||
* it('...', async(inject([AClass], (object) => {
|
||||
* object.doSomething.then(() => {
|
||||
|
@ -42,4 +47,4 @@ export function async(fn: Function): (done: any) => any {
|
|||
// TODO @JiaLiPassion, remove this after all library updated to
|
||||
// newest version of zone.js(0.8.25)
|
||||
return asyncFallback(fn);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue