Search code examples
node.jsbamboojestjsgrunt-jestgulp-jest

How to generate a report file using facebook Jest


Im using Jest to run unit tests on my application.

Is there a way I can get it to generate any sort of report file? I would like to integrate the report with Bamboo.


Solution

  • install this

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

    add this on your jest.config.file

    "reporters": [
            "default",
            ["jest-junit", { outputName: "junitreport.xml" }]
        ]
    

    on bamboo use the junit parser, configure it to find file in this way

    **/junitreport.xml