angular-docs-cn/packages/core/schematics/migrations/wait-for-async
Kristiyan Kostadinov 59ef40988e feat(core): support TypeScript 4.2 (#41158)
Updates the repo to TypeScript 4.2 and tslib 2.1.0.

PR Close #41158
2021-03-17 09:10:25 -07:00
..
BUILD.bazel feat(core): add automated migration to replace async with waitForAsync (#39212) 2020-10-13 09:55:34 -07:00
README.md feat(core): add automated migration to replace async with waitForAsync (#39212) 2020-10-13 09:55:34 -07:00
index.ts feat(core): support TypeScript 4.2 (#41158) 2021-03-17 09:10:25 -07:00
util.ts feat(core): add automated migration to replace async with waitForAsync (#39212) 2020-10-13 09:55:34 -07:00

README.md

async -> waitForAsync migration

Automatically migrates from async to waitForAsync by changing function calls and renaming imports.

Before

import { async } from '@angular/core/testing';

it('should work', async(() => {
  // async testing logic
}));

After

import { waitForAsync } from '@angular/core/testing';

it('should work', waitForAsync(() => {
  // async testing logic
}));