fix(material/core): test environment check not picking up jest (#23722)#23924
Merged
amysorto merged 1 commit intoangular:12.2.xfrom Nov 9, 2021
Merged
fix(material/core): test environment check not picking up jest (#23722)#23924amysorto merged 1 commit intoangular:12.2.xfrom
amysorto merged 1 commit intoangular:12.2.xfrom
Conversation
…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.
devversion
approved these changes
Nov 8, 2021
Member
devversion
left a comment
There was a problem hiding this comment.
LGTM, assuming we want to cut a LTS release for this
|
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
windoworglobal, 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 usedeclare constfor it, because it causes issues in g3.I've also reverted some of the
anytypes that had to be added in #23636.Fixes #23365.