{"_id":"@ci-pulse/jest-cipulse-reporter","_rev":"5-bb1424a116b96ec99da457013910a509","name":"@ci-pulse/jest-cipulse-reporter","dist-tags":{"latest":"1.1.4"},"versions":{"1.1.0":{"name":"@ci-pulse/jest-cipulse-reporter","version":"1.1.0","keywords":["jest","reporter","ci","cipulse","test-reporter"],"author":"","license":"MIT","_id":"@ci-pulse/jest-cipulse-reporter@1.1.0","maintainers":[{"name":"cipulse","email":"shane@rspsdata.org"}],"dist":{"shasum":"dd721c15386b055b7f77a34891cee9d9fa0fc22e","tarball":"https://registry.npmjs.org/@ci-pulse/jest-cipulse-reporter/-/jest-cipulse-reporter-1.1.0.tgz","fileCount":4,"integrity":"sha512-O+/ilGpsAo95xh7gSIvVT/8QlWCtJGHFXj2Dkz7bg3DNBK5VHgyt761mTxxXAjAjh4/kBVeT1snOh15xd+aSDg==","signatures":[{"sig":"MEQCIAlug7rsdEG1J3a7PlDfteAc1sV110qKyTR9G97JDH/QAiBD4HvpYxQRcFrmwYsYTqHyG9/2ifHgCLo/f+5tZV1fQQ==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":10672},"main":"dist/index.js","types":"dist/index.d.ts","shasum":"dd721c15386b055b7f77a34891cee9d9fa0fc22e","scripts":{"lint":"eslint 'src/**/*.ts'","test":"jest","build":"tsc","format":"prettier --write 'src/**/*.ts'","prepublishOnly":"bun run build"},"_npmUser":{"name":"cipulse","email":"shane@rspsdata.org"},"_integrity":"sha512-O+/ilGpsAo95xh7gSIvVT/8QlWCtJGHFXj2Dkz7bg3DNBK5VHgyt761mTxxXAjAjh4/kBVeT1snOh15xd+aSDg==","_npmVersion":"10.8.3","description":"A Jest reporter that sends test results to CIPulse API","directories":{},"_nodeVersion":"22.6.0","dependencies":{"axios":"^1.8.4","eslint":"^9.25.1","prettier":"^3.5.3","eslint-config-prettier":"^10.1.2","eslint-plugin-prettier":"^5.2.6","@typescript-eslint/parser":"^8.31.0","@typescript-eslint/eslint-plugin":"^8.31.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.7.0","typescript":"^5.3.3","@types/jest":"^29.5.12","@types/node":"^20.11.24"},"_npmOperationalInternal":{"tmp":"tmp/jest-cipulse-reporter_1.1.0_1745592195322_0.31135485510326033","host":"s3://npm-registry-packages-npm-production"}},"1.1.1":{"name":"@ci-pulse/jest-cipulse-reporter","version":"1.1.1","keywords":["jest","reporter","ci","cipulse","test-reporter"],"author":"","license":"MIT","_id":"@ci-pulse/jest-cipulse-reporter@1.1.1","maintainers":[{"name":"cipulse","email":"shane@rspsdata.org"}],"dist":{"shasum":"b68b6096d058b6f2ffa12cd3a9837c6ea488c0bf","tarball":"https://registry.npmjs.org/@ci-pulse/jest-cipulse-reporter/-/jest-cipulse-reporter-1.1.1.tgz","fileCount":4,"integrity":"sha512-5RGONxceZ05FxZVS/mAWWNqyhMpCu816xjJ2yxgXM4u60V76XoOz+MjHndg5q8WpsZU3lYmvhfXYe2U309ma3g==","signatures":[{"sig":"MEYCIQCIKY0AOk5eKmQfQ98A/34qmYtob0TINO7R9mn+yqlnrgIhALkK67KxCEKzi2wzNqgJZgFwc9pUlGkLRfHr66PgcPq+","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":10699},"main":"dist/index.js","types":"dist/index.d.ts","shasum":"b68b6096d058b6f2ffa12cd3a9837c6ea488c0bf","scripts":{"lint":"eslint 'src/**/*.ts'","test":"jest","build":"tsc","format":"prettier --write 'src/**/*.ts'","prepublishOnly":"bun run build"},"_npmUser":{"name":"cipulse","email":"shane@rspsdata.org"},"_integrity":"sha512-5RGONxceZ05FxZVS/mAWWNqyhMpCu816xjJ2yxgXM4u60V76XoOz+MjHndg5q8WpsZU3lYmvhfXYe2U309ma3g==","_npmVersion":"10.8.3","description":"A Jest reporter that sends test results to CIPulse API","directories":{},"_nodeVersion":"22.6.0","dependencies":{"axios":"^1.8.4","eslint":"^9.25.1","prettier":"^3.5.3","eslint-config-prettier":"^10.1.2","eslint-plugin-prettier":"^5.2.6","@typescript-eslint/parser":"^8.31.0","@typescript-eslint/eslint-plugin":"^8.31.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.7.0","typescript":"^5.3.3","@types/jest":"^29.5.12","@types/node":"^20.11.24"},"_npmOperationalInternal":{"tmp":"tmp/jest-cipulse-reporter_1.1.1_1745592312996_0.3089302172815278","host":"s3://npm-registry-packages-npm-production"}},"1.1.2":{"name":"@ci-pulse/jest-cipulse-reporter","version":"1.1.2","keywords":["jest","reporter","ci","cipulse","test-reporter"],"author":"","license":"MIT","_id":"@ci-pulse/jest-cipulse-reporter@1.1.2","maintainers":[{"name":"cipulse","email":"shane@rspsdata.org"}],"dist":{"shasum":"3ac08f8a7412cc68a4caada6b84eacaa25ae0aef","tarball":"https://registry.npmjs.org/@ci-pulse/jest-cipulse-reporter/-/jest-cipulse-reporter-1.1.2.tgz","fileCount":4,"integrity":"sha512-mLULXhZZKoN/MmQEMKNCgqatbQ8X0WnxYlUOpdX0B/+sEwYA6d8aMsKe5IIoo4C2SVVkTQlYUibykc7GRixfCQ==","signatures":[{"sig":"MEUCIFiwQgpjoG/IzSIw+IQGCNdJX1AfSzWKLD5KzgHDVnnHAiEAtBD5fxgjSmq9mmCQgF5x4fgAEFWZcgttpekx4JLtgLc=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":10699},"main":"dist/index.js","types":"dist/index.d.ts","shasum":"3ac08f8a7412cc68a4caada6b84eacaa25ae0aef","scripts":{"lint":"eslint 'src/**/*.ts'","test":"jest","build":"tsc","format":"prettier --write 'src/**/*.ts'","prepublishOnly":"bun run build"},"_npmUser":{"name":"cipulse","email":"shane@rspsdata.org"},"_integrity":"sha512-mLULXhZZKoN/MmQEMKNCgqatbQ8X0WnxYlUOpdX0B/+sEwYA6d8aMsKe5IIoo4C2SVVkTQlYUibykc7GRixfCQ==","_npmVersion":"10.8.3","description":"A Jest reporter that sends test results to CIPulse API","directories":{},"_nodeVersion":"22.6.0","dependencies":{"axios":"^1.8.4"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.7.0","eslint":"^9.25.1","prettier":"^3.5.3","typescript":"^5.3.3","@types/jest":"^29.5.12","@types/node":"^20.11.24","eslint-config-prettier":"^10.1.2","eslint-plugin-prettier":"^5.2.6","@typescript-eslint/parser":"^8.31.0","@typescript-eslint/eslint-plugin":"^8.31.0"},"_npmOperationalInternal":{"tmp":"tmp/jest-cipulse-reporter_1.1.2_1745592469928_0.5748406705080371","host":"s3://npm-registry-packages-npm-production"}},"1.1.3":{"name":"@ci-pulse/jest-cipulse-reporter","version":"1.1.3","keywords":["jest","reporter","ci","cipulse","test-reporter"],"author":"","license":"MIT","_id":"@ci-pulse/jest-cipulse-reporter@1.1.3","maintainers":[{"name":"cipulse","email":"shane@rspsdata.org"}],"dist":{"shasum":"5cc7764f8a99d9e5f3fc240ea9cb1f5e0d7c64a4","tarball":"https://registry.npmjs.org/@ci-pulse/jest-cipulse-reporter/-/jest-cipulse-reporter-1.1.3.tgz","fileCount":4,"integrity":"sha512-4pWjAP2x5eTzSHbotkERb6e8xZIXulboVGWsBuCRDJv6KvPKu0oFxQwnH9SLn+9uhYnNxhjxdHjEjhqRU2LwIQ==","signatures":[{"sig":"MEUCIQCoSegIlnME9ZyfNXWkd/6iFWTXwuLyz6+l46SV9O8V8AIgc/nAKgYaxXS8oRQVkMEFho3OSPN/wHV+8q26d2cQ844=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":11369},"main":"dist/index.js","types":"dist/index.d.ts","gitHead":"dfa22ee27004f9533e3592fcf2a26c3cbf89932f","scripts":{"lint":"eslint 'src/**/*.ts'","test":"jest","build":"tsc","format":"prettier --write 'src/**/*.ts'","prepublishOnly":"bun run build"},"_npmUser":{"name":"cipulse","email":"shane@rspsdata.org"},"_npmVersion":"11.2.0","description":"A Jest reporter that sends test results to CIPulse API","directories":{},"_nodeVersion":"22.14.0","dependencies":{"axios":"^1.8.4"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.7.0","eslint":"^9.25.1","prettier":"^3.5.3","typescript":"^5.3.3","@types/jest":"^29.5.12","@types/node":"^20.11.24","eslint-config-prettier":"^10.1.2","eslint-plugin-prettier":"^5.2.6","@typescript-eslint/parser":"^8.31.0","@typescript-eslint/eslint-plugin":"^8.31.0"},"_npmOperationalInternal":{"tmp":"tmp/jest-cipulse-reporter_1.1.3_1747032310211_0.8485053949955723","host":"s3://npm-registry-packages-npm-production"}},"1.1.4":{"name":"@ci-pulse/jest-cipulse-reporter","version":"1.1.4","description":"A Jest reporter that sends test results to CIPulse API","main":"dist/index.js","types":"dist/index.d.ts","publishConfig":{"access":"public"},"scripts":{"build":"tsc","prepublishOnly":"bun run build","test":"jest","lint":"eslint 'src/**/*.ts'","format":"prettier --write 'src/**/*.ts'"},"keywords":["jest","reporter","ci","cipulse","test-reporter"],"author":"","license":"MIT","devDependencies":{"@types/jest":"^29.5.12","@types/node":"^20.11.24","@typescript-eslint/eslint-plugin":"^8.31.0","@typescript-eslint/parser":"^8.31.0","eslint":"^9.25.1","eslint-config-prettier":"^10.1.2","eslint-plugin-prettier":"^5.2.6","jest":"^29.7.0","prettier":"^3.5.3","typescript":"^5.3.3"},"dependencies":{"axios":"^1.8.4"},"_id":"@ci-pulse/jest-cipulse-reporter@1.1.4","gitHead":"8048793d38a204e2ff7e7b77c837d44a5d18098e","_nodeVersion":"22.14.0","_npmVersion":"11.2.0","dist":{"integrity":"sha512-Uh5aih5JbWC1R+VCZLAAh7AtsQTC3tZK0cU3kTdUsOw0dcWCHDxegUaKUsMnCCL3QN9Ti9ebfMeVxP84IlGcxA==","shasum":"2acf43058967a3b1e72e21f7c98ff5f64bd67059","tarball":"https://registry.npmjs.org/@ci-pulse/jest-cipulse-reporter/-/jest-cipulse-reporter-1.1.4.tgz","fileCount":4,"unpackedSize":11521,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQCWno6UmqeX8caUi903FVCldQsWAgErdE6ilKrDoCXrAQIhAI+nG++sfVgMQOKkdbvCSWk2cpynzHQTeX68oOOQwSvf"}]},"_npmUser":{"name":"cipulse","email":"shane@rspsdata.org"},"directories":{},"maintainers":[{"name":"cipulse","email":"shane@rspsdata.org"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/jest-cipulse-reporter_1.1.4_1747033012186_0.9166443156638044"},"_hasShrinkwrap":false}},"time":{"created":"2025-04-25T14:43:15.242Z","modified":"2025-05-12T06:56:52.548Z","1.1.0":"2025-04-25T14:43:15.511Z","1.1.1":"2025-04-25T14:45:13.181Z","1.1.2":"2025-04-25T14:47:50.091Z","1.1.3":"2025-05-12T06:45:10.394Z","1.1.4":"2025-05-12T06:56:52.352Z"},"license":"MIT","keywords":["jest","reporter","ci","cipulse","test-reporter"],"description":"A Jest reporter that sends test results to CIPulse API","maintainers":[{"name":"cipulse","email":"shane@rspsdata.org"}],"readme":"# Jest CIPulse Reporter\n\nA Jest reporter that sends test results to the CIPulse API for tracking and visualization.\n\n## Features\n\n- Reports detailed test results to CIPulse\n- Tracks passed, failed, and pending tests\n- Collects test durations and failure messages\n- Integrates with CI/CD pipelines\n- Supports environment variables for configuration\n\n## Installation\n\n```bash\nnpm install --save-dev @ci-ulse/jest-cipulse-reporter\n```\n\n## Configuration\n\nAdd the reporter to your Jest configuration:\n\n### In jest.config.js\n\n```js\nmodule.exports = {\n  // ... other Jest configuration\n  reporters: [\n    \"default\", // Keep the default reporter for console output\n    [\n      \"@ci-ulse/jest-cipulse-reporter\",\n      {\n        apiKey: \"your-api-key\",\n        // Optional parameters\n        repositoryId: \"your-repository-id\", // CIPulse repository ID\n        projectName: \"your-project-name\",\n        // These can be set via environment variables instead\n        // commitSha: process.env.GIT_COMMIT,\n        // branch: process.env.GIT_BRANCH,\n        // buildNumber: process.env.BUILD_NUMBER,\n        // buildUrl: process.env.BUILD_URL\n      },\n    ],\n  ],\n};\n```\n\n### In package.json\n\n```json\n{\n  \"jest\": {\n    \"reporters\": [\n      \"default\",\n      [\n        \"@ci-ulse/jest-cipulse-reporter\",\n        {\n          \"apiKey\": \"your-api-key\",\n          \"repositoryId\": \"your-repository-id\"\n        }\n      ]\n    ]\n  }\n}\n```\n\n## Environment Variables\n\nThe reporter will automatically look for these environment variables if the corresponding options are not provided:\n\n- `PROJECT_NAME`: Name of your project\n- `GIT_COMMIT`: Current commit SHA\n- `GIT_BRANCH`: Current branch name\n- `BUILD_NUMBER`: CI/CD build number\n- `BUILD_URL`: URL to the build in your CI/CD system\n\n## Required Options\n\n- `apiKey`: An API key generated in the CIPulse dashboard\n\n## Optional Options\n\n- `apiUrl`: The URL of the CIPulse API endpoint (defaults to \"https://app.cipulse.dev/api/test-reports\")\n- `repositoryId`: The ID of your repository in CIPulse\n- `projectName`: Name of your project\n- `commitSha`: The Git commit SHA\n- `branch`: The Git branch name\n- `buildNumber`: Your CI/CD build number\n- `buildUrl`: URL to your build in your CI/CD system\n\n## CI/CD Integration\n\n### GitHub Actions\n\n```yaml\nname: Run Tests with CIPulse Reporter\n\non:\n  push:\n    branches: [main]\n  pull_request:\n    branches: [main]\n\njobs:\n  test:\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions/checkout@v3\n      - name: Setup Node.js\n        uses: actions/setup-node@v3\n        with:\n          node-version: \"18\"\n      - name: Install dependencies\n        run: npm ci\n      - name: Run tests\n        run: npm test\n        env:\n          GIT_COMMIT: ${{ github.sha }}\n          GIT_BRANCH: ${{ github.ref_name }}\n          BUILD_NUMBER: ${{ github.run_number }}\n          BUILD_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}\n```\n\n### CircleCI\n\n```yaml\nversion: 2.1\njobs:\n  test:\n    docker:\n      - image: cimg/node:18.0\n    steps:\n      - checkout\n      - run: npm ci\n      - run:\n          name: Run tests\n          command: npm test\n          environment:\n            GIT_COMMIT: << pipeline.git.revision >>\n            GIT_BRANCH: << pipeline.git.branch >>\n            BUILD_NUMBER: << pipeline.number >>\n            BUILD_URL: << pipeline.url >>\n```\n\n### Jenkins\n\n```groovy\npipeline {\n    agent {\n        docker {\n            image 'node:18-alpine'\n        }\n    }\n    stages {\n        stage('Test') {\n            steps {\n                sh 'npm ci'\n                sh 'npm test'\n            }\n            environment {\n                GIT_COMMIT = \"${env.GIT_COMMIT}\"\n                GIT_BRANCH = \"${env.GIT_BRANCH}\"\n                BUILD_NUMBER = \"${env.BUILD_NUMBER}\"\n                BUILD_URL = \"${env.BUILD_URL}\"\n            }\n        }\n    }\n}\n```\n\n## Sample Output\n\nHere's what gets sent to the CIPulse API:\n\n```json\n{\n  \"success\": 42,\n  \"failed\": 5,\n  \"pending\": 3,\n  \"total\": 50,\n  \"duration\": 12500,\n  \"startTime\": \"2023-04-18T12:30:45.123Z\",\n  \"endTime\": \"2023-04-18T12:30:57.623Z\",\n  \"repositoryId\": \"repo_123abc\",\n  \"projectName\": \"My Awesome Project\",\n  \"commitSha\": \"a1b2c3d4e5f6g7h8i9j0\",\n  \"branch\": \"feature/new-thing\",\n  \"buildNumber\": \"42\",\n  \"buildUrl\": \"https://jenkins.example.com/job/my-project/42\",\n  \"tests\": [\n    {\n      \"title\": \"should add numbers correctly\",\n      \"status\": \"passed\",\n      \"duration\": 15,\n      \"filePath\": \"src/calculator.test.js\",\n      \"fullName\": \"Calculator should add numbers correctly\"\n    },\n    {\n      \"title\": \"should subtract numbers correctly\",\n      \"status\": \"failed\",\n      \"duration\": 20,\n      \"failureMessages\": [\"Expected: 5, Received: 3\"],\n      \"filePath\": \"src/calculator.test.js\",\n      \"fullName\": \"Calculator should subtract numbers correctly\"\n    }\n  ]\n}\n```\n\n## License\n\nMIT\n","readmeFilename":"README.md"}