-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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
Updated run to pass globalSetup and globalTeardown configuration #5961
Conversation
Codecov Report
@@ Coverage Diff @@
## master #5961 +/- ##
=======================================
Coverage 64.33% 64.33%
=======================================
Files 217 217
Lines 8286 8286
Branches 4 3 -1
=======================================
Hits 5331 5331
Misses 2954 2954
Partials 1 1
Continue to review full report at Codecov.
|
ping @timReynolds |
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.
Good idea. Would be cool to rebase, fixing lints and have a simple test for it :)
### `globalTeardown` [string] | ||
|
||
Default: `undefined` | ||
|
||
This option allows the use of a custom global teardown module which exports an | ||
async function that is triggered once after all test suites. | ||
|
||
Jest's configuration object is passed as a parameter to the `globalTeardown` |
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's not, strictly speaking, Jest configuration. It's a part of config, that's responsible for globally available options, for every project
out there. I think we should make it clear and link e.g. to type definition.
@timReynolds ping 🙂 |
An integration test could print some value from the config into a file or something |
@timReynolds ping again :D |
@SimenB sorry I've not got time to look at this and have therefore closed the issue. |
This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Summary
Updated call to
globalSetup
andglobalTeardown
to pass jest's configuration object to the users provided function, outlined in #5957Test plan
This change doesn't include any integration tests, given the current setup I wasn't sure the best way to do this. If someone can suggest how I should update the integration tests for this change I'd be happy to do so.