Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(material/core): test environment check not picking up jest (#23722) #23924

Merged
merged 1 commit into from
Nov 9, 2021

Conversation

crisbeto
Copy link
Member

@crisbeto crisbeto commented Nov 8, 2021

Note: this is the 12.2.x version of #23722.

In #23636 the test environment check was changed so that it looks for the test objects either on window or global, however it looks like this isn't enough to pick up Jest which isn't published on either.

These changes simplify the setup by looking up the value globally and disabling the type checking error with @ts-ignore. We can't use declare const for it, because it causes issues in g3.

I've also reverted some of the any types that had to be added in #23636.

Fixes #23365.

@crisbeto crisbeto added merge safe target: lts This PR is targeting a version currently in long-term support labels Nov 8, 2021
@google-cla google-cla bot added the cla: yes PR author has agreed to Google's Contributor License Agreement label Nov 8, 2021
…ar#23722)

In angular#23636 the test environment check was changed so that it looks for the test objects either on `window` or `global`, however it looks like this isn't enough to pick up Jest which isn't published on either.

These changes simplify the setup by looking up the value globally and disabling the type checkng error with `@ts-ignore`. We can't use `declare const` for it, because it causes issues in g3.

I've also reverted some of the `any` types that had to be added in angular#23636.

Fixes angular#23365.
Copy link
Member

@devversion devversion left a comment

Choose a reason for hiding this comment

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

LGTM, assuming we want to cut a LTS release for this

@crisbeto crisbeto added the action: merge The PR is ready for merge by the caretaker label Nov 8, 2021
@amysorto amysorto merged commit a0cf522 into angular:12.2.x Nov 9, 2021
@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 Dec 10, 2021
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 cla: yes PR author has agreed to Google's Contributor License Agreement target: lts This PR is targeting a version currently in long-term support
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants