{"_id":"@d2t/vitest-ctrf-json-reporter","_rev":"7-b3d91faa0c2fd02208110ca813c35a5b","name":"@d2t/vitest-ctrf-json-reporter","dist-tags":{"latest":"1.3.0"},"versions":{"1.0.1":{"name":"@d2t/vitest-ctrf-json-reporter","version":"1.0.1","author":{"name":"David Ichilov"},"license":"MIT","_id":"@d2t/vitest-ctrf-json-reporter@1.0.1","maintainers":[{"name":"david2tm","email":"david2tm@gmail.com"}],"homepage":"https://github.com/david2tm/d2t-vitest-ctrf-json-reporter#readme","bugs":{"url":"https://github.com/david2tm/d2t-vitest-ctrf-json-reporter/issues"},"dist":{"shasum":"f5544d34597291a9527a1841d8d063ed76cd90b4","tarball":"https://registry.npmjs.org/@d2t/vitest-ctrf-json-reporter/-/vitest-ctrf-json-reporter-1.0.1.tgz","fileCount":7,"integrity":"sha512-n+78mwPxFKgN4Y/mNmPAEHrBEdH3Z+6V3LBUFDSIF3UFrwALRHxlTSaNJaGEdcVnUN8gqWmA5Jib+XTMSlwHhA==","signatures":[{"sig":"MEYCIQCTaPv50eSqxvTySQ5e7CfT34C50SgZNV7t7eeVKvLcBgIhALjrnT9Ckc6L19cYJaA9AggP9szNra/xAcmmOg/ls2KJ","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@d2t%2fvitest-ctrf-json-reporter@1.0.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":17183},"main":"dist/index.js","type":"module","types":"./dist/index.d.ts","gitHead":"d27fc02eb91b619d9206c1f7791f599b7a1a2770","scripts":{"lint":"eslint . --fix","build":"tsc","format":"prettier --write .","lint-check":"eslint . --max-warnings=0","format-check":"prettier --check ."},"_npmUser":{"name":"david2tm","email":"david2tm@gmail.com"},"repository":{"url":"git+https://github.com/david2tm/d2t-vitest-ctrf-json-reporter.git","type":"git"},"_npmVersion":"10.9.2","description":"A Vitest test reporter to create test results reports","directories":{},"_nodeVersion":"22.14.0","publishConfig":{"access":"public","provenance":true},"_hasShrinkwrap":false,"devDependencies":{"eslint":"^9.24.0","vitest":"^3.1.1","prettier":"^3.5.3","typescript":"^5.8.3","@types/node":"^22.14.0","@vitest/runner":"^3.1.1","semantic-release":"^24.2.3","typescript-eslint":"^8.29.1","eslint-config-prettier":"^10.1.1","@typescript-eslint/parser":"^8.29.1","@typescript-eslint/eslint-plugin":"^8.29.1"},"_npmOperationalInternal":{"tmp":"tmp/vitest-ctrf-json-reporter_1.0.1_1744275342403_0.1245091385808319","host":"s3://npm-registry-packages-npm-production"}},"1.1.0":{"name":"@d2t/vitest-ctrf-json-reporter","version":"1.1.0","author":{"name":"David Ichilov"},"license":"MIT","_id":"@d2t/vitest-ctrf-json-reporter@1.1.0","maintainers":[{"name":"david2tm","email":"david2tm@gmail.com"}],"homepage":"https://github.com/david2tm/d2t-vitest-ctrf-json-reporter#readme","bugs":{"url":"https://github.com/david2tm/d2t-vitest-ctrf-json-reporter/issues"},"dist":{"shasum":"9f859078c0cc6e6a5cb6fcc691623f6f51f6b6d9","tarball":"https://registry.npmjs.org/@d2t/vitest-ctrf-json-reporter/-/vitest-ctrf-json-reporter-1.1.0.tgz","fileCount":6,"integrity":"sha512-ruWeL04k/V1SUsK3NLE1tBuR0XCCHIpS3JCtPF5LpHt1IZZPxScLzYurZ7JD5berpmVUKkh89noxPsg5N7LV4w==","signatures":[{"sig":"MEYCIQCwNGN3iA+EKl0BBOkFA955jMEqN0lT2pTwRPsXIpiYVwIhAPAAsDqG4K+fM+dMEQpUA7NyVrckI7+xxdZ70Jsk18kr","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@d2t%2fvitest-ctrf-json-reporter@1.1.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":16441},"main":"dist/index.js","type":"module","types":"./dist/index.d.ts","gitHead":"4027f9acf04c724d5893f8b4a8cd3d03a947160c","scripts":{"lint":"eslint . --fix","build":"npm run clean && node ./build/esbuild.js","clean":"rimraf dist","format":"prettier --write .","lint-check":"eslint . --max-warnings=0","format-check":"prettier --check ."},"_npmUser":{"name":"david2tm","email":"david2tm@gmail.com"},"repository":{"url":"git+https://github.com/david2tm/d2t-vitest-ctrf-json-reporter.git","type":"git"},"_npmVersion":"10.9.2","description":"A Vitest test reporter to create test results reports","directories":{},"_nodeVersion":"22.14.0","publishConfig":{"access":"public","provenance":true},"_hasShrinkwrap":false,"devDependencies":{"eslint":"^9.24.0","rimraf":"^6.0.1","vitest":"^3.1.1","esbuild":"^0.25.2","prettier":"^3.5.3","typescript":"^5.8.3","@types/node":"^22.14.0","@vitest/runner":"^3.1.1","semantic-release":"^24.2.3","typescript-eslint":"^8.29.1","esbuild-plugin-d.ts":"^1.3.1","eslint-config-prettier":"^10.1.1","@typescript-eslint/parser":"^8.29.1","@typescript-eslint/eslint-plugin":"^8.29.1"},"_npmOperationalInternal":{"tmp":"tmp/vitest-ctrf-json-reporter_1.1.0_1744276685393_0.5540222008992168","host":"s3://npm-registry-packages-npm-production"}},"1.2.0":{"name":"@d2t/vitest-ctrf-json-reporter","version":"1.2.0","author":{"name":"David Ichilov"},"license":"MIT","_id":"@d2t/vitest-ctrf-json-reporter@1.2.0","maintainers":[{"name":"david2tm","email":"david2tm@gmail.com"}],"homepage":"https://github.com/david2tm/d2t-vitest-ctrf-json-reporter#readme","bugs":{"url":"https://github.com/david2tm/d2t-vitest-ctrf-json-reporter/issues"},"dist":{"shasum":"1bc4f9e894ccfcecb85f6e1fee55063c488cb954","tarball":"https://registry.npmjs.org/@d2t/vitest-ctrf-json-reporter/-/vitest-ctrf-json-reporter-1.2.0.tgz","fileCount":6,"integrity":"sha512-CL+vAIdavJ3rr1IBE0lv5NvUtxigNTnNDo99hLMlgMkbOpzMvhV3EksQQt3CjweVVnPuTbiSqXXyqAKA7JINjg==","signatures":[{"sig":"MEUCIH/XRh8TvIfMJPzgVCe/Qgbd/tTc0X0rIWgEShzTnnmHAiEA1wECWqFRqK9PNjHsJt6sgvbyvbdJfZ+AXsxX5CRwSy8=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@d2t%2fvitest-ctrf-json-reporter@1.2.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":17988},"main":"dist/index.js","type":"module","types":"./dist/index.d.ts","gitHead":"99ef226a96f80c6d1cbc660a0d588bc5536e19d1","scripts":{"lint":"eslint . --fix","build":"npm run clean && node ./build/esbuild.js","clean":"rimraf dist","format":"prettier --write .","lint-check":"eslint . --max-warnings=0","format-check":"prettier --check ."},"_npmUser":{"name":"david2tm","actor":{"name":"david2tm","type":"user","email":"david2tm@gmail.com"},"email":"david2tm@gmail.com"},"repository":{"url":"git+https://github.com/david2tm/d2t-vitest-ctrf-json-reporter.git","type":"git"},"_npmVersion":"10.9.3","description":"A Vitest test reporter to create test results reports","directories":{},"_nodeVersion":"22.14.0","publishConfig":{"access":"public","provenance":true},"_hasShrinkwrap":false,"devDependencies":{"eslint":"^9.30.0","rimraf":"^6.0.1","vitest":"^3.2.4","esbuild":"^0.25.5","prettier":"^3.6.2","typescript":"^5.8.3","@types/node":"^24.0.7","@vitest/runner":"^3.2.4","semantic-release":"^24.2.6","typescript-eslint":"^8.35.0","esbuild-plugin-d.ts":"^1.3.1","eslint-config-prettier":"^10.1.5","@typescript-eslint/parser":"^8.35.0","@typescript-eslint/eslint-plugin":"^8.35.0"},"_npmOperationalInternal":{"tmp":"tmp/vitest-ctrf-json-reporter_1.2.0_1751356052350_0.12599244407108734","host":"s3://npm-registry-packages-npm-production"}},"1.3.0":{"name":"@d2t/vitest-ctrf-json-reporter","version":"1.3.0","description":"A Vitest test reporter to create test results reports","main":"dist/index.js","type":"module","scripts":{"clean":"rimraf dist","build":"npm run clean && node ./build/esbuild.js","lint":"eslint . --fix","lint-check":"eslint . --max-warnings=0","format":"prettier --write .","format-check":"prettier --check ."},"publishConfig":{"access":"public","provenance":true},"repository":{"type":"git","url":"git+https://github.com/david2tm/d2t-vitest-ctrf-json-reporter.git"},"author":{"name":"David Ichilov"},"license":"MIT","devDependencies":{"@types/node":"^24.4.0","@typescript-eslint/eslint-plugin":"^8.43.0","@typescript-eslint/parser":"^8.43.0","@vitest/runner":"^3.2.4","esbuild":"^0.25.9","esbuild-plugin-d.ts":"^1.3.1","eslint":"^9.35.0","eslint-config-prettier":"^10.1.8","prettier":"^3.6.2","rimraf":"^6.0.1","semantic-release":"^24.2.8","typescript":"^5.9.2","typescript-eslint":"^8.43.0","vitest":"^3.2.4"},"_id":"@d2t/vitest-ctrf-json-reporter@1.3.0","gitHead":"72a4c2f118be63ef974b0d126cfd2a5349db941c","types":"./dist/index.d.ts","bugs":{"url":"https://github.com/david2tm/d2t-vitest-ctrf-json-reporter/issues"},"homepage":"https://github.com/david2tm/d2t-vitest-ctrf-json-reporter#readme","_nodeVersion":"22.14.0","_npmVersion":"10.9.3","dist":{"integrity":"sha512-3Xgkay0Hubq1hA67IW2vM3YhX4TQgjOFW2TydB0ytAL97zOZI9xr/9vqCjo31bK1qUDNEdlKYLYHd8KR9YSCCw==","shasum":"a7d8ef4090edd90542ad5da2d2eb664c203a6b06","tarball":"https://registry.npmjs.org/@d2t/vitest-ctrf-json-reporter/-/vitest-ctrf-json-reporter-1.3.0.tgz","fileCount":6,"unpackedSize":18333,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@d2t%2fvitest-ctrf-json-reporter@1.3.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQCjn9HwPgHlpusr+oHkfIDqN3BkXvnrI5AtC87ZPxofVgIhAIPW2PYiM/OlaFqEgTvsC4/bgGiEDdw9yXxcC/ZZ9MfO"}]},"_npmUser":{"name":"david2tm","email":"david2tm@gmail.com"},"directories":{},"maintainers":[{"name":"david2tm","email":"david2tm@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/vitest-ctrf-json-reporter_1.3.0_1758098542177_0.368817514533899"},"_hasShrinkwrap":false}},"time":{"created":"2025-04-10T08:55:42.317Z","modified":"2025-09-17T08:42:22.774Z","1.0.0":"2025-04-10T08:35:30.194Z","1.0.1":"2025-04-10T08:55:42.563Z","1.1.0":"2025-04-10T09:18:05.560Z","1.2.0":"2025-07-01T07:47:32.541Z","1.3.0":"2025-09-17T08:42:22.355Z"},"bugs":{"url":"https://github.com/david2tm/d2t-vitest-ctrf-json-reporter/issues"},"author":{"name":"David Ichilov"},"license":"MIT","homepage":"https://github.com/david2tm/d2t-vitest-ctrf-json-reporter#readme","repository":{"type":"git","url":"git+https://github.com/david2tm/d2t-vitest-ctrf-json-reporter.git"},"description":"A Vitest test reporter to create test results reports","maintainers":[{"name":"david2tm","email":"david2tm@gmail.com"}],"readme":"# Vitest JSON Test Results Report\n\n> Save Vitest test results as a JSON file\n\nA Vitest test reporter to create test reports that follow the CTRF standard.\n\n[Common Test Report Format](https://ctrf.io) ensures the generation of uniform JSON test reports, independent of programming languages or test framework in use.\n\n## Features\n\n- Generate JSON test reports that are [CTRF](https://ctrf.io) compliant\n- Straightforward integration with Vitest\n\n```json\n{\n  \"results\": {\n    \"tool\": {\n      \"name\": \"vitest\"\n    },\n    \"summary\": {\n      \"tests\": 1,\n      \"passed\": 1,\n      \"failed\": 0,\n      \"pending\": 0,\n      \"skipped\": 0,\n      \"other\": 0,\n      \"start\": 1706828654274,\n      \"stop\": 1706828655782\n    },\n    \"tests\": [\n      {\n        \"name\": \"ctrf should generate the same report with any tool\",\n        \"status\": \"passed\",\n        \"duration\": 100\n      }\n    ],\n    \"environment\": {\n      \"appName\": \"MyApp\",\n      \"buildName\": \"MyBuild\",\n      \"buildNumber\": \"1\"\n    }\n  }\n}\n```\n\n## What is CTRF?\n\nCTRF is a universal JSON test report schema that addresses the lack of a standardized format for JSON test reports.\n\n**Consistency Across Tools:** Different testing tools and frameworks often produce reports in varied formats. CTRF ensures a uniform structure, making it easier to understand and compare reports, regardless of the testing tool used.\n\n**Language and Framework Agnostic:** It provides a universal reporting schema that works seamlessly with any programming language and testing framework.\n\n**Facilitates Better Analysis:** With a standardized format, programmatically analyzing test outcomes across multiple platforms becomes more straightforward.\n\n## Installation\n\n```bash\nnpm install --save-dev @d2t/vitest-ctrf-json-reporter\n```\n\nAdd the reporter to your vitest.config.js file:\n\n```javascript\nreporters: ['default', ['@d2t/vitest-ctrf-json-reporter', {}]]\n```\n\nRun your tests:\n\n```bash\nnpx vitest\n```\n\nYou'll find a JSON file named `ctrf-report.json` in the `ctrf` directory.\n\n## Reporter Options\n\nThe reporter supports several configuration options:\n\n```javascript\nreporter: [\n  [\n    '@d2t/vitest-ctrf-json-reporter',\n    {\n      outputFile: 'custom-name.json', // Optional: Output file name. Defaults to 'ctrf-report.json'.\n      outputDir: 'custom-directory', // Optional: Output directory path. Defaults to 'ctrf'.\n      minimal: true, // Optional: Generate a minimal report. Defaults to 'false'. Overrides screenshot and testType when set to true\n      testType: 'unit', // Optional: Specify the test type (e.g., 'unit', 'component'). Defaults to 'unit'.\n      appName: 'MyApp', // Optional: Specify the name of the application under test.\n      appVersion: '1.0.0', // Optional: Specify the version of the application under test.\n      osPlatform: 'linux', // Optional: Specify the OS platform.\n      osRelease: '18.04', // Optional: Specify the OS release version.\n      osVersion: '5.4.0', // Optional: Specify the OS version.\n      buildName: 'MyApp Build', // Optional: Specify the build name.\n      buildNumber: '100', // Optional: Specify the build number.\n      buildUrl: 'https://ctrf.io', // Optional: Specify the build url.\n      repositoryName: 'ctrf-json', // Optional: Specify the repository name.\n      repositoryUrl: 'https://gh.io', // Optional: Specify the repository url.\n      branchName: 'main', // Optional: Specify the branch name.\n      testEnvironment: 'staging', // Optional: Specify the test environment (e.g. staging, production).\n    },\n  ],\n]\n```\n\n## Test Object Properties\n\nThe test object in the report includes the following [CTRF properties](https://ctrf.io/docs/schema/test):\n\n| Name        | Type    | Required | Details                                                                             |\n| ----------- | ------- | -------- | ----------------------------------------------------------------------------------- |\n| `name`      | String  | Required | The name of the test.                                                               |\n| `status`    | String  | Required | The outcome of the test. One of: `passed`, `failed`, `skipped`, `pending`, `other`. |\n| `duration`  | Number  | Required | The time taken for the test execution, in milliseconds.                             |\n| `message`   | String  | Optional | The failure message if the test failed.                                             |\n| `trace`     | String  | Optional | The stack trace captured if the test failed.                                        |\n| `suite`     | String  | Optional | The suite or group to which the test belongs.                                       |\n| `message`   | String  | Optional | The failure message if the test failed.                                             |\n| `trace`     | String  | Optional | The stack trace captured if the test failed.                                        |\n| `rawStatus` | String  | Optional | The original vitest status of the test before mapping to CTRF status.               |\n| `type`      | String  | Optional | The type of test (e.g., `unit`, `component`).                                       |\n| `filepath`  | String  | Optional | The file path where the test is located in the project.                             |\n| `retries`   | Number  | Optional | The number of retries attempted for the test.                                       |\n| `flaky`     | Boolean | Optional | Indicates whether the test result is flaky.                                         |\n| `line`      | Number  | Optional | Line number in the source file if the test failed.                                  |\n","readmeFilename":"README.md"}