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

feat(jest-cli): add forceExitAfterTestRun avg #1847

Closed

Conversation

yutin1987
Copy link

After run all tests that force exit when forceExitAfterTestRun is true

#1456

const success = !result || result.success;
process.on('exit', () => process.exit(success ? 0 : 1));

if (argv.forceExitAfterTestRun === true) process.exit(success ? 0 : 1);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

our code style requires curly braces here.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done :)

@@ -261,6 +261,12 @@ const options = {
'Will run all tests affected by file changes in the last commit made.',
type: 'boolean',
},
forceExitAfterTestRun: {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not a fan of this name. Can we call it forceExit or exitOnComplete or something similar?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok, change to forceExit

forceExitAfterTestRun: {
default: false,
description:
'After run all tests that force exit.',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'Force Jest to exit after all tests have completed running. This is useful when resources set up by test code cannot be adequately cleaned up.'

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done :)

@yutin1987 yutin1987 force-pushed the feature/forceExitAfterTestRun branch from aabcb89 to 3f2710f Compare October 3, 2016 11:33
After run all tests that force exit when forceExit is true

jestjs#1456
@yutin1987 yutin1987 force-pushed the feature/forceExitAfterTestRun branch from 3f2710f to fff2730 Compare October 3, 2016 11:36
@cpojer cpojer closed this Oct 5, 2016
cpojer pushed a commit that referenced this pull request Oct 17, 2016
…1847) (#1870)

* feat(jest-cli): add forceExit avg on cli

After run all tests that force exit when forceExit is true

#1456

* Fix typecheck & linter offences

* Improve null check expression

* Update index.js
okonet pushed a commit to okonet/jest that referenced this pull request Nov 11, 2016
…estjs#1847) (jestjs#1870)

* feat(jest-cli): add forceExit avg on cli

After run all tests that force exit when forceExit is true

jestjs#1456

* Fix typecheck & linter offences

* Improve null check expression

* Update index.js
nickpresta pushed a commit to nickpresta/jest that referenced this pull request Nov 15, 2016
…estjs#1847) (jestjs#1870)

* feat(jest-cli): add forceExit avg on cli

After run all tests that force exit when forceExit is true

jestjs#1456

* Fix typecheck & linter offences

* Improve null check expression

* Update index.js
trolster added a commit to trolster/urcli that referenced this pull request Mar 2, 2017
The test run wouldn't exit because of the async call. This forces it to exit
even if it can't correctly clean up after the tests.

Referenced here: jestjs/jest#1847.
tushardhole pushed a commit to tushardhole/jest that referenced this pull request Aug 21, 2017
…estjs#1847) (jestjs#1870)

* feat(jest-cli): add forceExit avg on cli

After run all tests that force exit when forceExit is true

jestjs#1456

* Fix typecheck & linter offences

* Improve null check expression

* Update index.js
@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 14, 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.

None yet

3 participants