vitest-github-actions-reporter
TypeScript icon, indicating that this package has built-in type declarations

0.11.1 • Public • Published

vitest-github-actions-reporter

npm version CI MIT License

Vitest reporter to create annotations when running tests in GitHub Actions.

image

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.

// vite.config.js / vite.config.ts
import GithubActionsReporter from 'vitest-github-actions-reporter'

export default {
  test: {
    reporters: process.env.GITHUB_ACTIONS
      ? ['default', new GithubActionsReporter()]
      : 'default'
  }
}

Then run vitest with GitHub Actions. That's all. GitHub Actions will do everything other.

Options

trimRepositoryPrefix

Default: true
Trims /home/runner/{repository name} / D:\a\{repository name} in stacktrace. The image below is a preview when it is false. image

hideStackTrace

Default: false
Hides stacktrace in message. The image below is a preview when it is true. image

Readme

Keywords

Package Sidebar

Install

npm i vitest-github-actions-reporter

Weekly Downloads

11,282

Version

0.11.1

License

MIT

Unpacked Size

42 kB

Total Files

9

Last publish

Collaborators

  • sapphi-red