Registry / testing / bamboo-jest-reporter

bamboo-jest-reporter

JSON →
library1.0.3jsnpmunverified

bamboo-jest-reporter is a Jest test reporter designed to integrate test, coverage, and snapshot results with Atlassian Bamboo's Mocha Test Parser. It transforms Jest's native output into a `jest.json` file, making it consumable by Bamboo. Currently at version 1.0.3, the package appears to be stable with a focus on specific enterprise CI/CD integration. Its key differentiator lies in its tailored output format for Bamboo and granular control over which aspects of Jest's results (tests, code coverage, or obsolete snapshots) are reported as failures, configurable via environment variables, allowing for flexible build pipeline management. This specificity makes it a niche but valuable tool for teams using Jest with Bamboo.

npm install bamboo-jest-reporter
INSTALL
IMPORT
SIG · BAMBOO-JEST-REPORT
B
bamboo-jest-reporter
testingjavascriptv1.0.3
Install
Import
Disk
Pass rate
0/ 6
Env Coverage0 / 6
glibc
1822
musl
1822
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18226 runs
build_error
glibc
node 18226 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Reporter Configuration
reporters: [ "default", "bamboo-jest-reporter" ]
import { BambooJestReporter } from 'bamboo-jest-reporter'
The reporter is configured as a string in Jest's `reporters` array within `jest.config.js` or `package.json`, not directly imported as a module.
Standalone Reporter
reporters: [ "bamboo-jest-reporter" ]
const reporter = require('bamboo-jest-reporter')
If you do not want Jest's default console output, you can list only `"bamboo-jest-reporter"` in the `reporters` array. Do not attempt to `require` or `import` the reporter directly into your code.

Demonstrates `package.json` configuration for Jest to use `bamboo-jest-reporter` and generate a `jest.json` report, including coverage.

{ "name": "my-project", "version": "1.0.0", "scripts": { "test": "jest --coverage" }, "devDependencies": { "jest": "^29.0.0", "bamboo-jest-reporter": "^1.0.0" }, "jest": { "collectCoverage": true, "coverageDirectory": "coverage", "reporters": [ "default", "bamboo-jest-reporter" ], "collectCoverageFrom": [ "src/**/*.js" ], "coverageThreshold": { "global": { "branches": 80, "functions": 80, "statements": 80, "lines": 80 } } } } // To run this example: // 1. Save the above JSON into your package.json. // 2. Create a 'src' directory with at least one .js file and a corresponding test file (e.g., src/index.js and src/__tests__/index.test.js). // 3. Ensure your Jest tests run successfully. // 4. Run `npm install`. // 5. Execute `npm test`. // This will generate a `jest.json` file in your project root.
Debug
Known issues
gotchaThe reporter's behavior for tests, coverage, and obsolete snapshots can be toggled using specific environment variables (JEST_REPORTER_ADD_TESTS, JEST_REPORTER_ADD_COVERAGE, JEST_REPORTER_SNAPSHOTS_ADD_OBSOLETE). If these are inadvertently set to `false`, expected reports might not be generated in `jest.json`, potentially masking failures.
fix
Ensure environment variables are set correctly in your CI/CD environment or explicitly unset them if default reporting is desired. The default behavior is to report all three aspects.
affects: >=1.0.0
gotchaFor code coverage to be included in the `jest.json` report and for `coverageThreshold` failures to be registered, Jest's `collectCoverage` option must be set to `true` and `coverageThreshold` must be configured in your Jest configuration. Without these, coverage data will be absent.
fix
Add `collectCoverage: true` and a `coverageThreshold` object to your `jest.config.js` or `package.json` Jest configuration. Alternatively, run Jest with `jest --coverage`.
affects: >=1.0.0
gotchaIf you configure Jest with `reporters: [ "bamboo-jest-reporter" ]` (omitting `"default"`), Jest will not print its standard test output to the console. This can make debugging local test failures difficult as there will be no immediate console feedback.
fix
For local development or environments where console output is desired, use `reporters: [ "default", "bamboo-jest-reporter" ]`. Only omit `"default"` in CI environments where console output is parsed differently or explicitly not needed.
affects: >=1.0.0
Errors
Common errors & fixes
The automated jest tests did not pass. Please check the tests-tab (or similar message in Bamboo logs)
Even if an npm test script is configured to `exit 0` on failure, Bamboo's Mocha Test Parser task will still interpret failures reported in `jest.json` as build failures.
fix
This is expected behavior for Bamboo to correctly report test outcomes. If you want the shell command to pass but for Bamboo to show failures in the 'Tests' tab, this setup is correct. To prevent Bamboo from failing the *build* due to test failures, you would need to modify Bamboo's build plan logic, not the reporter.
Coverage data or thresholds are not appearing in the Bamboo test report.
Jest's `collectCoverage` is not enabled, or `coverageThreshold` is not configured in the Jest settings.
fix
Ensure `collectCoverage: true` is set in your `jest.config.js` or `package.json` Jest configuration, and that a `coverageThreshold` object is defined for desired coverage targets.
jest.json file is not being generated or is empty.
The `bamboo-jest-reporter` is not correctly configured in the Jest reporters array, or Jest tests are not being run.
fix
Verify that `"bamboo-jest-reporter"` is present in the `reporters` array within your Jest configuration. Also, confirm that your `npm test` script correctly executes Jest.
Upgrade
Version history
1.0.3latest on npm
Audit
Dependencies
jestrequiredThis package is a reporter for Jest and requires Jest to be installed as a development dependency in the consuming project.
Agent activity
22 hits · last 30 days
node
18
OpenAI (training)
1
Resources
bamboo-jest-reporter — npm install bamboo-jest-reporter · libregistry