Skip to content

Latest commit

History

4 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

Code Coverage Danger JS plugin

Description

This plugin analyzes your last pull request, and displays the code coverage on the new files and modified files you just wrote

Installation

You need to install Danger JS first:

yarn add -D danger

Then add this package

yarn add -D code-coverage-dangerjs-plugin

Usage

  • Create a dangerfile (dangerfile.js or dangerfile.ts at the root of your project folder)
  • Edit it with
import{sendCoverageMessage}from"code-coverage-dangerjs-plugin";sendCoverageMessage();
  • Run locally to test if it works
yarn danger local

You should see some lines in your terminal

Example for Circle CI:

version: 2jobs:
build:
steps:
- run: ... YOUR OTHER STEPS ...
- run:
name: Run Dangercommand: yarn danger cienvironment:
DANGER_GITHUB_API_TOKEN: YOUR_GITHUB_TOKEN
  • Push a new PR and run the CI on it.
  • Go see your pull request with a useful comment!
  • ⭐️Add a star on this repo if you like it ;)

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages