Skip to content

Latest commit

 

History

History
30 lines (21 loc) · 1.16 KB

code-coverage.md

File metadata and controls

30 lines (21 loc) · 1.16 KB

Code coverage

Translations: Español, Français, Italiano, 日本語, Português, Русский, 简体中文

Use nyc to compute the code coverage of your tests.

First install nyc:

$ npm install --save-dev nyc

At its simplest run AVA through nyc. In your package.json file:

{
	"scripts": {
		"test": "nyc ava"
	}
}

You may want to exclude the .nyc_output and coverage directories from source control. Assuming you're using Git, add the following to your .gitignore file:

.nyc_output
coverage