Skip to content

Stop stack trace in xml report file #11

@christophss

Description

@christophss

Using jest config noStackTrace: true, stack trace is removed from console when test fails but the stack trace still continues to be added to the reporter xml file. Is there a way to stop stack trace (like below) from being added to the xml file in failure message string.

<?xml version="1.0" encoding="UTF-8"?> <testsuites> <testsuite id="0" name="/test/functional/test.js" errors="0" package="/test/functional/test.js" hostname="localhost" tests="1" failures="1" time="61.522" timestamp="2017-12-22T18:36:41"> <properties> </properties> <testcase classname="Test Call" name="Call Test" time="0"> <failure message="Error: Actual: 0 is not equal to Expected: 1, Test Failed. at Object.&lt;anonymous&gt;.exports.toBeEqual (/src/helper/assert.js:26:20) at _callee5$ (/test/functional/test.js:74:32) at tryCatch (/node_modules/regenerator-runtime/runtime.js:65:40) at Generator.invoke [as _invoke] (/node_modules/regenerator-runtime/runtime.js:299:22) at Generator.prototype.(anonymous function) [as next] (/node_modules/regenerator-runtime/runtime.js:117:21) at step (/test/functional/test.js:2:374) at /test/functional/test.js:2:534 at &lt;anonymous&gt; at process._tickCallback (internal/process/next_tick.js:188:7)" type="AssertionError"> </failure> </testcase> <system-out/> <system-err/> </testsuite> </testsuites>

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions