-
-
Notifications
You must be signed in to change notification settings - Fork 174
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
jest: support custom testEnvironment #834
jest: support custom testEnvironment #834
Conversation
commit: |
021d2c5
to
839f679
Compare
I think it's because of a previous build, you can run |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice, just one nitpick but happy to merge!
environments = ['jest-environment-jsdom']; | ||
} else if (config.testEnvironment) { | ||
environments = [config.testEnvironment]; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we could make it a const
in one line? That's become a bit of a standard whenever possible, for consistency.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would require a nested ternary but I can do that!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed in b80e392
Thanks @tryggvigy! Nested ternaries aren't marvellous, but heck. |
🚀 This pull request is included in v5.37.0. See Release 5.37.0 for release notes. Using Knip in a commercial project? Please consider becoming a sponsor. |
This PR
Adds support for custom
testEnvironment
files like:I get a unit test failure on the cli version when running the tests locally. Maybe it'll pass in CI. Anyone know how to fix that?