vitest-github-actions-reporter
![MIT License](http://img.shields.io/badge/license-MIT-blue.svg?style=flat)
Vitest reporter to create annotations when running tests in GitHub Actions.
![image](https://user-images.githubusercontent.com/49056869/156349772-832e6536-e781-491b-8d5b-b3b3077aa7ce.png)
Thanks to jest-github-actions-reporter
for ideas.
Install
npm i -D vitest-github-actions-reporter # yarn add -D vitest-github-actions-reporter
Usage
Add this reporter to vite.config.js
/ vite.config.ts
.
import GithubActionsReporter from 'vitest-github-actions-reporter'
export default {
test: {
reporters: process.env.GITHUB_ACTIONS ? new GithubActionsReporter() : 'default'
}
}
Then run vitest
with GitHub Actions.
That's all. GitHub Actions will do everything other.
Options
hideStackTrace
Hides stack trace in message.
![image](https://user-images.githubusercontent.com/49056869/156354039-750a6194-eb76-4adb-bbd6-7c2b65ec80a4.png)