Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/bashaus/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.
https://github.com/bashaus/jest-ado-reporter
Last synced: 24 days ago
JSON representation
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.
- Host: GitHub
- URL: https://github.com/bashaus/jest-ado-reporter
- Owner: bashaus
- Created: 2023-07-04T22:33:11.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-07-05T15:00:29.000Z (over 1 year ago)
- Last Synced: 2024-09-16T12:57:03.253Z (about 2 months ago)
- Language: TypeScript
- Homepage:
- Size: 354 KB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-jest - jest-ado-reporter
README
# 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.
```bash
npm i --save-dev jest-ado-reporter
# - or -
yarn add -D jest-ado-reporter
```You can then add the reporter to your jest configuration (e.g.: `jest.config.ts`)
```javascript
import type { Config } from "jest";const config: Config = {
reporters: ["default", "jest-ado-reporter" /* add this */],
};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:
```javascript
['jest-ado-reporter', { enabled: true }],
```Output locally, when used in parallel with the `default` reporter:
```bash
$ jest
##vso[task.setprogress value=1;]jest
PASS test5.spec.tsx
##vso[task.setprogress value=17;]jest
PASS test2.spec.tsx
##vso[task.setprogress value=34;]jest
PASS test4.spec.tsx
PASS test3.spec.ts
##vso[task.setprogress value=50;]jest
##vso[task.setprogress value=67;]jest
PASS test1.spec.ts
##vso[task.setprogress value=84;]jest
PASS test6.spec.tsx
##vso[task.setprogress value=99;]jestTest 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.
```