Skip to content

Conversation

@mtsmfm
Copy link
Contributor

@mtsmfm mtsmfm commented Dec 18, 2018

Currently filepath starts with / but in most case, it's a wrong path.

How to reproduce

git clone https://github.com/jest-community/jest-junit
cd jest-junit
yarn install
JEST_JUNIT_SUITE_NAME='{filepath}' yarn jest --env node integration-tests/reporter/__tests__/simple.test.js --reporters=default --reporters=$PWD/index.js

Before

<testsuites name="jest tests" tests="1" failures="0" time="0.336">
  <testsuite name="/integration-tests/reporter/__tests__/simple.test.js" errors="0" failures="0" skipped="0" timestamp="2018-12-18T10:54:15" time="0.216" tests="1">
    <testcase classname="foo should pass" name="foo should pass" time="0.003">
    </testcase>
  </testsuite>
</testsuites>

After

<testsuites name="jest tests" tests="1" failures="0" time="0.364">
  <testsuite name="integration-tests/reporter/__tests__/simple.test.js" errors="0" failures="0" skipped="0" timestamp="2018-12-18T10:55:11" time="0.241" tests="1">
    <testcase classname="foo should pass" name="foo should pass" time="0.003">
    </testcase>
  </testsuite>
</testsuites>

@mtsmfm
Copy link
Contributor Author

mtsmfm commented Dec 22, 2018

@palmerj3 Can I ask you to review?

@palmerj3
Copy link
Collaborator

@mtsmfm the change itself looks good and thanks for taking the time to contribute!

Before I merge could you please just provide a rationale for this change? What problem(s) is it solving on your end?

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants