jest-ado-reporter
Reports jest test suite progress information to the pipeline step in Azure DevOps. Useful for displaying progress when you have a lot of tests to run.
Installation
Add the dependency to your application.
npm i --save-dev jest-ado-reporter
yarn add -D jest-ado-reporter
You can then add the reporter to your jest configuration (e.g.: jest.config.ts
)
import type { Config } from "jest";
const config: Config = {
reporters: ["default", "jest-ado-reporter" ],
};
export default config;
Options
enabled
Type of boolean
.
The reporter will only output logging commands when running in a Azure DevOps pipeline. If you would like to force this locally for debugging purposes, you can set the enabled
option to true
.
Example:
['jest-ado-reporter', { enabled: true }],
Output locally, when used in parallel with the default
reporter:
$ jest
PASS test5.spec.tsx
PASS test2.spec.tsx
PASS test4.spec.tsx
PASS test3.spec.ts
PASS test1.spec.ts
PASS test6.spec.tsx
Test Suites: 6 passed, 6 total
Tests: 18 passed, 18 total
Snapshots: 0 total
Time: 5.617 s
Ran all test suites.
✨ Done in 9.97s.