Translations: Español, Français, Italiano, 日本語, Português, Русский, 简体中文
Use c8 to compute the code coverage of your tests.
First install c8:
$ npm install --save-dev c8
At its simplest run AVA through c8. In your package.json file:
{
"scripts": {
"test": "c8 ava"
}
}You may want to exclude the coverage directory from source control. Assuming you're using Git, add the following to your .gitignore file:
coverage