Skip to content

Conversation

crisbeto
Copy link
Member

Adds a migration that finds all imports and calls to the deprecated async function from @angular/core/testing and replaces them with waitForAsync.

These changes also move a bit of code out of the Renderer2 migration so that it can be reused.

@google-cla google-cla bot added the cla: yes label Oct 10, 2020
@@ -4,7 +4,7 @@
"noFallthroughCasesInSwitch": true,
"strict": true,
"lib": ["es2015"],
"types": [],
"types": ["jasmine"],
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change isn't required for the migration, but it makes it so that vscode can autocomplete the Jasmine functions in tests.

@crisbeto crisbeto changed the title feat(core/testing): add automated migration to replace async with waitForAsync feat(core): add automated migration to replace async with waitForAsync Oct 10, 2020
@crisbeto crisbeto force-pushed the wait-for-async-migration branch from 7c97834 to 81ff023 Compare October 10, 2020 11:03
@crisbeto crisbeto added action: review The PR is still awaiting reviews from at least one requested reviewer area: migrations Issues related to `ng update`/`ng generate` migrations area: testing Issues related to Angular testing features, such as TestBed target: major This PR is targeted for the next major release labels Oct 10, 2020
@ngbot ngbot bot modified the milestone: needsTriage Oct 10, 2020
@crisbeto crisbeto marked this pull request as ready for review October 10, 2020 11:37
@pullapprove pullapprove bot requested a review from josephperrott October 10, 2020 11:38
Copy link
Member

@josephperrott josephperrott left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Just the one comment to take a look at.

Adds a migration that finds all imports and calls to the deprecated `async` function from
`@angular/core/testing` and replaces them with `waitForAsync`.

These changes also move a bit of code out of the `Renderer2` migration so that it can be reused.
@crisbeto crisbeto force-pushed the wait-for-async-migration branch from 81ff023 to cedf76a Compare October 12, 2020 16:07
@crisbeto crisbeto added action: merge The PR is ready for merge by the caretaker action: presubmit The PR is in need of a google3 presubmit and removed action: review The PR is still awaiting reviews from at least one requested reviewer labels Oct 12, 2020
@atscott atscott removed the action: presubmit The PR is in need of a google3 presubmit label Oct 13, 2020
@atscott atscott closed this in 5ce71e0 Oct 13, 2020
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Nov 13, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
action: merge The PR is ready for merge by the caretaker area: migrations Issues related to `ng update`/`ng generate` migrations area: testing Issues related to Angular testing features, such as TestBed cla: yes target: major This PR is targeted for the next major release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants