Jest — JSON Results
Jest's --json output, where skipped tests are called pending and the totals appear as flat numTotal/numPassed/numFailed fields alongside per-file assertionResults. Timestamps are epoch milliseconds rather than ISO strings, which is the field most converters mis-handle. Reports the same canonical run as the JUnit dialect files: 12 tests, 9 passed, 1 assertion failure, 1 error and 1 skip.
{
"numTotalTestSuites": 3,
"numPassedTestSuites": 1,
"numFailedTestSuites": 2,
"numPendingTestSuites": 0,
"numRuntimeErrorTestSuites": 0,
"numTotalTests": 12,
"numPassedTests": 9,
"numFailedTests": 2,
"numPendingTests": 1,
"numTodoTests": 0,
"startTime": 1786000462031,
"success": false,
"wasInterrupted": false,
"testResults": [
{
"name": "/builds/novus/src/cart/pricing.test.ts",
"status": "failed",
"startTime": 1786000462031,
"endTime": 1786000469481,
"assertionResults": [
{
"ancestorTitles": [
"cart.PricingTest"
],
"fullName": "cart.PricingTest appliesUnitPrice",
"status": "passed",
"title": "appliesUnitPrice",
"duration": 643,
"failureMessages": [],
"failureDetails": [],
"invocations": 1,
"location": null,
"numPassingAsserts": 3
},
{
"ancestorTitles": [
"cart.PricingTest"
],
"fullName": "cart.PricingTest appliesQuantityMultiplier",
"status": "passed",
"title": "appliesQuantityMultiplier",
"duration": 659,
"failureMessages": [],
"failureDetails": [],
"invocations": 1,
"location": null,
"numPassingAsserts": 3
},
{Specifications
- Seed
- 61200
- Encoding
- UTF-8
- Line Endings
- LF
- Format
- jest --json
- Tests
- 12
- Passed
- 9
- Failed
- 2
- Pending
- 1
- Test Suites
- 3
- Duration Unit
- milliseconds
- Skipped Called Pending
- true
Testing contract
Expected to pass- Scenario
- Reconcile Jest's flat totals with its per-file assertion results.
- Expected result
- numTotalTests=12 equals the number of assertionResults across the three files, and numPendingTests=1 corresponds to the single skipped case.
What is a .json file?
JSON (JavaScript Object Notation) is a lightweight, text-based data-interchange format representing objects, arrays, strings, numbers, booleans, and null. It is language-independent, human-readable, and the dominant format for web APIs and configuration. It requires a single well-formed root value.
How to use this file
Use an example JSON file to test parsers and serializers, schema validation, Unicode and number-precision handling, and API request or response processing.
How to use this file for testing
“Jest — JSON Results” is a deterministic Novus Examples fixture for JSON parsing, Conversion testing, Error handling. Flat, deeply nested, JSON Lines, and intentionally invalid JSON for testing parsers and error handling.
Documented properties for this file: seed 61200 · UTF-8 · LF. Compare results against paired or grouped companions on this page when present (clean↔damaged, searchable↔scanned, or format twins) so scores stay reproducible across runs.
Download the file once, keep the path stable in CI or local scripts, and treat the spec table as the contract: dimensions, seeds, field lists, and roles are intentional. Corrupt or invalid samples are labelled as such — expect parsers to fail loudly rather than silently accept them.
Test and coverage reports document their totals (suites, cases, passes, failures, skips, covered lines) in the spec table. Point your CI dashboard, coverage gate, or report converter at the file and assert those counts survive; format twins carry identical numbers so a conversion can be scored exactly.
Feed the file to your parser and assert it handles the documented quirks — quoted delimiters, embedded newlines, ragged rows, or invalid syntax; the valid↔invalid distinction is labelled in the title.
Code examples
import json
with open("jest-results.json") as f:
data = json.load(f)
print(type(data), len(data))Related files
- jsonpytest — JSON Report (pytest-json-report)The pytest-json-report document, which records setup, call and teardown as three separate phases per test and keeps error distinct from failed in its summary. A test can pass its call phase and still error in teardown, which is why summing outcomes without reading the phases gives the wrong total. Reports the same canonical run as the JUnit dialect files: 12 tests, 9 passed, 1 assertion failure, 1 error and 1 skip.

- jsonCucumber JSON — Failing Step with Stack TraceOne step of one scenario fails with an assertion message and a stack frame; every other step passes. In cucumber.json a scenario has no status of its own — it is failed if any of its steps is — so this file catches reporters that look for a scenario-level field that does not exist.

- jsonCucumber JSON — Undefined, Pending and Skipped StepsThe three non-failure statuses BDD runners produce and dashboards routinely collapse into "failed": undefined (no step definition matched), pending (explicitly unimplemented) and skipped (never attempted). Whether the run is red depends on the runner's strict setting, which is exactly the decision this file forces.

- ndjsonCucumber Messages — Failing Run (NDJSON)The messages twin of the failing run: one testStepFinished carries status FAILED with both a human message and a structured exception object, and testRunFinished reports success false. Comparing it with the passing stream in the other group isolates exactly which envelopes a failure changes.

- jsonnpm audit Report (v1, Legacy Shape)The legacy npm audit shape — numeric advisory ids, a separate actions array and dependency paths written with '>' — which tools built for the v2 report silently read as zero findings. Advisory identifiers use the invented NOVUS-SAMPLE namespace with SAMPLE-CVE aliases; no identifier here refers to a published CVE, GHSA or OSV record, and no package named exists.

- jsonnpm package-lock.json (lockfileVersion 2, Dual Layout)The transitional npm v2 lockfile, which carries BOTH the v3 packages map and the legacy nested dependencies tree describing the same fictional install — the case where a parser must not double-count. Every package, version, hash and licence is fictional — the tree describes nothing real.

Generated by generation/testing.py. Free for any use, no attribution required — license.