-
-
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
testResultsProcessor and multi-project #4406
Comments
Oh yeah, that's missing. @rogeliog just added a |
@cpojer sure that sounds reasonable - I'll give it a shot. Thanks! One thing though... if someone does not specify a displayName for multiple projects then I'm still left with no precise way to differentiate what tests belong to what project. Is it also reasonable to pass along the project base dir to the testResultsProcessor for each test suite? |
I think it's reasonable to expect the displayName to be there, or are you talking about the use case where you are not in control of your packages? |
Just thinking of edge cases since displayName is not a required field. I'll work on the PR for bringing displayName to the aggregated results. |
Cool, closing this one now. |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Do you want to request a feature or report a bug?
Feature
What is the current behavior?
If the same testResultsProcessor is used for all projects then the resulting JSON data does not provide any reference to what project a particular suite/test belongs to.
I have created a sample project which shows the output that a testResultsProcessor receives in a jest multi-project environment as of now.
https://github.com/palmerj3/jest-multi-project-testResultProcessor
You can see the output here.
What is the expected behavior?
I would like it if jest updated the JSON results that are sent to testResultsProcessor so a "project" variable is available indicating the "rootDir" of the project the test/suite is associated with.
I propose that jest adds a new variable to the posted results that associates a test suite with a jest project. E.g.
The project path would be the directory that contains the jest.config.js file and/or package.json file that defines a given jest project.
This would give testResultsProcessors the ability to more easily provide multiple outputs per project. In the case of jest-junit (a project I maintain) I would like to be able to generate a junit.xml file for unit tests and integration tests for projects that I use this on.
Please provide your exact Jest configuration and mention your Jest, node, yarn/npm version and operating system.
Jest: v20.0.4
Yarn: 0.27.5
Node: v8.4.0
The text was updated successfully, but these errors were encountered: