{"id":13369,"library":"jest-ctrf-json-reporter","title":"Jest CTRF JSON Reporter","description":"The `jest-ctrf-json-reporter` package provides a Jest test reporter designed to generate JSON test reports that strictly adhere to the Common Test Report Format (CTRF) standard. Currently stable at version `0.0.11`, the package sees active development with frequent, minor updates addressing dependency bumps and feature enhancements, though it remains in the `0.x.x` release series, indicating potential for breaking changes prior to a `1.0.0` release. Its primary differentiator is its commitment to the CTRF open standard, which aims to standardize JSON test report schemas across various programming languages and testing frameworks. This standardization enables consistent parsing, validation, merging, and analysis of test outcomes, regardless of the underlying testing tool, thereby facilitating more robust CI/CD pipelines and cross-platform reporting solutions. This reporter is a crucial component for projects seeking universal and machine-readable test results.","status":"active","version":"0.0.11","language":"javascript","source_language":"en","source_url":"https://github.com/ctrf-io/jest-ctrf-json-reporter","tags":["javascript","ctrf","common-test-report-format","test-reporting","test-results","testing","json","ci","jest","typescript"],"install":[{"cmd":"npm install jest-ctrf-json-reporter","lang":"bash","label":"npm"},{"cmd":"yarn add jest-ctrf-json-reporter","lang":"bash","label":"yarn"},{"cmd":"pnpm add jest-ctrf-json-reporter","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Runtime dependency for Jest test reporting integration.","package":"jest","optional":false}],"imports":[{"note":"This package is a Jest reporter plugin; it is configured via the 'reporters' array in jest.config.js, not imported directly into application code using standard JavaScript import/require statements.","wrong":"import { JestCtrfJsonReporter } from 'jest-ctrf-json-reporter';","symbol":"'jest-ctrf-json-reporter'","correct":"reporters: [\n  'default',\n  ['jest-ctrf-json-reporter', {}],\n],"}],"quickstart":{"code":"npm install --save-dev jest-ctrf-json-reporter\n\n// jest.config.js\nmodule.exports = {\n  reporters: [\n    'default',\n    ['jest-ctrf-json-reporter', {\n      outputFile: 'my-project-report.json', // Optional: Custom output file name\n      outputDir: 'test-results/ctrf',    // Optional: Custom output directory\n      testType: 'e2e',                     // Optional: Specify the test type\n      appName: 'MyAwesomeApp',             // Optional: Name of the application\n      appVersion: '1.2.3'                // Optional: Version of the application\n    }],\n  ],\n};\n\n// Run your tests\nnpx jest","lang":"typescript","description":"Demonstrates how to install the reporter, configure it in `jest.config.js` with common options, and execute Jest tests to generate a CTRF-compliant JSON report."},"warnings":[{"fix":"Consult the GitHub release notes and changelog before upgrading and perform thorough regression testing.","message":"Since the package is in its `0.x.x` version series, breaking changes may be introduced without adhering strictly to semantic versioning's major version bumps (e.g., `1.0.0`). Developers should review release notes carefully when upgrading.","severity":"breaking","affected_versions":"<1.0.0"},{"fix":"Explicitly configure `outputFile` and `outputDir` options in `jest.config.js` to control the report location and name, ensuring they align with your project's structure.","message":"By default, the reporter outputs `ctrf-report.json` to a `ctrf` directory. If this default path conflicts with existing assets or is not expected, users might struggle to locate reports or inadvertently overwrite files.","severity":"gotcha","affected_versions":">=0.0.1"},{"fix":"Understand the implications of `minimal: true` and only use it when a less comprehensive report is intentionally desired. Avoid setting `minimal: true` if detailed information like `testType` or `screenshot` paths are required.","message":"The `minimal: true` option is designed to generate a stripped-down report and will override other detailed report properties, such as `screenshot` and `testType`, even if those options are explicitly set.","severity":"gotcha","affected_versions":">=0.0.10"}],"env_vars":null,"last_verified":"2026-04-19T00:00:00.000Z","next_check":"2026-07-18T00:00:00.000Z","problems":[{"fix":"Run `npm install --save-dev jest-ctrf-json-reporter` and double-check the reporter string `'jest-ctrf-json-reporter'` in your `jest.config.js` file.","cause":"The package was not installed, or there is a typo in the reporter name within the Jest configuration.","error":"Error: Reporter 'jest-ctrf-json-reporter' not found."},{"fix":"Ensure your Jest tests are executing and completing without errors. Verify the `outputDir` and `outputFile` settings in `jest.config.js`, confirming the specified paths are valid and writable by the process running Jest.","cause":"Jest tests either did not run, failed to complete successfully, or the `outputDir` and `outputFile` options are misconfigured or pointing to an inaccessible location.","error":"No `ctrf-report.json` file generated in the expected directory."}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":"","cli_version":null}