Skip to content

Jest JSON results

You can generate Jest JSON results by setting your Jest output to JSON. Read more about exporting Jest results into JSON here

Check out our example Jest JSON test suite for a more detailed example.

Jest JSON format

Download our example file here: example_jest_report.json

Report

Majority of top-level data is ignored as Calliope.pro will generate this automatically based on the report results.

  • numFailedTestSuites ignored
  • numFailedTests ignored
  • numPassedTestSuites ignored
  • numPassedTests ignored
  • numPendingTestSuites ignored
  • numPendingTests ignored
  • numRuntimeErrorTestSuites ignored
  • numTodoTests ignored
  • numTotalTestSuites ignored
  • numTotalTests ignored
  • openHandles ignored
  • snapshot ignored
  • startTime ignored
  • success ignored
  • testResults we iterate over testResults and define each object as a container
  • wasInterrupted ignored

Test Results

A test result will be read as a container with one or more assertion result(s). Test results will also be categorised by our "smart" feature that groups containers together based on the name attribute. This can be disabled by adding the smart=false parameter to your request.

  • assertionResults we iterate over the array and define each object within as a result.
  • endTime is used with startTime to calculate an average duration time of the test result.
  • message stored as description.
  • name stored as title and, as described above, used to categorize the containers "smart".
  • startTime is used with endTime to calculate an average duration time of the test result.
  • status inherited from Test status
  • summary ignored

Assertion Result

An assertion result will be rewritten as result.

  • ancestorTitles if present, stored as title with title attribute.
  • failureMessages stored as exception_description.
  • fullName if ancestorTitles is not present, stored as title.
  • location ignored
  • status stored as status
  • title if ancestorTitles is present, stored as title with ancestorTitles attribute.