Skip to main content

Coverage test

Betterer ships several built-in tests to get you started. Check out the implementations for inspiration for your own tests!

@betterer/coverage

Use the coverage test to incrementally increase the per-file test coverage of your project.

@betterer/coverage expects an Istanbul json-summary to exist, so you must run your tests first.

import { coverage } from '@betterer/coverage';

export default {
'increase per-file test coverage': () => coverage()
};

Use the coverageTotal test to incrementally increase the total test coverage of your project.

import { coverageTotal } from '@betterer/coverage';

export default {
'increase total test coverage': () => coverageTotal()
};