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

docs: Document --testFailureExitCode #10542

Merged
merged 1 commit into from
Sep 29, 2020

Conversation

ArkadyDR
Copy link
Contributor

Summary

Includes the --testFailureExitCode config parameter in the documentation. This parameter was added in the 21.0.0 release by #4067 but wasn't included in the release notes or added to the documentation.

From a motivation perspective, at my company we're incorporating a variety of small create-react-app's into a much larger product that has a handrolled continuous integration system. It considers a non-zero exit code of a testing tool to be a build environment failure and will abort subsequent steps (it scoops up the test reports and process them to determine test failures). Given Jest's default behaviour of returning 1 for both test failures and tool failures I was going to need to find a way to distinguish between a test and a tool failure. I tried searching for this exact configuration in the docs and generally on google and came up empty, and then randomly stumbled on this CLI/config parameter when playing with a custom test runner (the example logs the whole config object to the console).

It'd be nice for this to be included in the official documentation so (a) others could benefit and (b) we had some confidence that it's not going to silently dissapear or become broken.

I've backdated it through the past versions as it was added before the oldest version of the documentation currently on the website.

Test plan

Ran up the website following contributor instructions (yarn, yarn start in the website directory). Item appears in the TOC and renders correctly.

image

image

Copy link
Contributor

@jeysal jeysal left a comment

Choose a reason for hiding this comment

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

Looks like this was added quite a long time ago #4067 probably because of a FB need, but it makes sense for this to be public to avoid people having to grep output or something, so good to have it documented.

@jeysal jeysal merged commit a4bdf96 into jestjs:master Sep 29, 2020
@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 11, 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.

4 participants