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

Updated run to pass globalSetup and globalTeardown configuration #5961

Closed
wants to merge 2 commits into from
Closed

Updated run to pass globalSetup and globalTeardown configuration #5961

wants to merge 2 commits into from

Conversation

timReynolds
Copy link
Contributor

Summary

Updated call to globalSetup and globalTeardown to pass jest's configuration object to the users provided function, outlined in #5957

Test 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.

@codecov-io
Copy link

codecov-io commented Apr 11, 2018

Codecov Report

Merging #5961 into master will not change coverage.
The diff coverage is 0%.

Impacted file tree graph

@@           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
Impacted Files Coverage Δ
packages/jest-cli/src/run_jest.js 70% <0%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 1a51672...c65e01c. Read the comment docs.

@SimenB
Copy link
Member

SimenB commented May 6, 2018

ping @timReynolds

Copy link
Collaborator

@thymikee thymikee left a 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`
Copy link
Collaborator

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.

@SimenB
Copy link
Member

SimenB commented Sep 17, 2018

@timReynolds ping 🙂

@SimenB
Copy link
Member

SimenB commented Sep 17, 2018

An integration test could print some value from the config into a file or something

@SimenB SimenB added this to the Jest 24 milestone Oct 16, 2018
@SimenB
Copy link
Member

SimenB commented Oct 16, 2018

@timReynolds ping again :D

@timReynolds
Copy link
Contributor Author

@SimenB sorry I've not got time to look at this and have therefore closed the issue.

@github-actions
Copy link

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.
Please note this issue tracker is not a help forum. We recommend using StackOverflow or our discord channel for questions.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 12, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants