fix(material/core): test environment check not picking up jest#23722
Merged
amysorto merged 1 commit intoangular:masterfrom Nov 8, 2021
Merged
fix(material/core): test environment check not picking up jest#23722amysorto merged 1 commit intoangular:masterfrom
amysorto merged 1 commit intoangular:masterfrom
Conversation
3f767f1 to
35fd965
Compare
devversion
approved these changes
Oct 11, 2021
Member
devversion
left a comment
There was a problem hiding this comment.
👍 hopefully that works. soo much nicer!
Contributor
|
@crisbeto This needs to be rebased |
35fd965 to
cdd9415
Compare
Member
Author
|
Rebased. |
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.
cdd9415 to
fbe1d24
Compare
|
are we going to get this in a patch release on 12 or will it only be in 13? It continues to litter our testing logs and we won't be able to go to 13 for at least a couple months |
Contributor
|
We'll try to do one last 12.2.x release for this fix after v13 |
amysorto
pushed a commit
that referenced
this pull request
Nov 8, 2021
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 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 #23636. Fixes #23365. (cherry picked from commit ff7fd48)
crisbeto
added a commit
to crisbeto/material2
that referenced
this pull request
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.
crisbeto
added a commit
to crisbeto/material2
that referenced
this pull request
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.
amysorto
pushed a commit
that referenced
this pull request
Nov 9, 2021
… (#23924) 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 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 #23636. Fixes #23365.
|
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.
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.