2

I am running a test using jest-junit and I want to change the default name of the output file which is junit.xml. I don't want to specify the outputname in the package.json or jest.config but instead I want to specify it in the ci something like

npx jest --ci --testResultsProcessor="jest-junit" --outputName="test.xml"

But this is still giving the output file as junit.xml. Is there something missing here?

Kewin Dousse
  • 3,880
  • 2
  • 25
  • 46

1 Answers1

0

Never mind, I achieved that by passing the file name to the environment variable JEST_JUNIT_OUTPUT_NAME.

ref- https://www.npmjs.com/package/jest-junit