-
-
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
Add testPath to suite in jest-jasmine2 reporter callbacks #5394
Conversation
Codecov Report
@@ Coverage Diff @@
## master #5394 +/- ##
==========================================
- Coverage 61.32% 61.31% -0.02%
==========================================
Files 205 205
Lines 6925 6927 +2
Branches 3 3
==========================================
Hits 4247 4247
- Misses 2677 2679 +2
Partials 1 1
Continue to review full report at Codecov.
|
Mind adding a test so we don't break it when removing jasmine? |
Ping @Vanuan Mind adding a test? |
Current tests already cover this code. Similar PR from @palmerj3 didn't have any additional tests so I don't know how to do it. Are you saying jasmine would be removed? I'd like to use it like this: const jasmineReporters = require('jasmine-reporters');
jasmine.getEnv().addReporter(
new jasmineReporters.JUnitXmlReporter({
// Jest runs many instances of Jasmine in parallel.
// Force distinct file output
// per test to avoid collisions.
modifyReportFileName: function(name, suite) {
return `${suite.testPath.replace("/", "_")}-${name}`;
}
... Maybe there's a simpler way to safely write JUnit report files? |
We have a future goal (on the backburner for now) of removing jasmine, replacing it with For JUnit xml in particular, you can use https://www.npmjs.com/package/jest-junit. Might be that this PR in particular is related to their one open issue, though: https://github.com/palmerj3/jest-junit/issues/39 🙂 |
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.
Seeing as the other PR was merged without tests, we can probably merge this as well
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
Add
testPath
tojest-jasmine2
reporter callbacks.Before:
After
Test plan
See #4594