Skip to content

Commit

Permalink
update README
Browse files Browse the repository at this point in the history
  • Loading branch information
cenfun committed Jan 7, 2024
1 parent 6107d82 commit 87c9b71
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -690,6 +690,21 @@ const test = testBase.extend({
});
export { test, expect };
```
- Take coverage on global teardown.
```js
// global-teardown.js
import { addCoverageReport } from 'monocart-reporter';

export default async (config) => {
const coverageData = await getYourCoverageData();

// there is no test info on teardown, simply mock it with required config
const mockTestInfo = {
config
};
await addCoverageReport(coverageData, mockTestInfo);
}
```

### Coverage Options
- Default [options](https://github.com/cenfun/monocart-coverage-reports/blob/main/lib/default/options.js)
Expand Down

0 comments on commit 87c9b71

Please sign in to comment.