Skip to content

Commit 2509d68

Browse files
authored
docs: update @rstest/coverage-istanbul readme (#572)
1 parent 11fb143 commit 2509d68

File tree

2 files changed

+34
-13
lines changed

2 files changed

+34
-13
lines changed
Lines changed: 18 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,28 @@
1-
# Rslib project
1+
<picture>
2+
<img alt="Rstest Banner" src="https://assets.rspack.rs/rstest/rstest-banner.png">
3+
</picture>
24

3-
## Setup
5+
# @rstest/coverage-istanbul
46

5-
Install the dependencies:
7+
[Istanbul](https://istanbul.js.org/) coverage provider for Rstest.
8+
9+
## Install
610

711
```bash
8-
pnpm install
12+
npm add @rstest/coverage-istanbul -D
913
```
1014

11-
## Get started
15+
## Usage
1216

13-
Build the library:
17+
Enable coverage collection in `rstest.config.ts`:
1418

15-
```bash
16-
pnpm build
17-
```
19+
```ts
20+
import { defineConfig } from '@rstest/core';
1821

19-
Build the library in watch mode:
20-
21-
```bash
22-
pnpm dev
22+
export default defineConfig({
23+
coverage: {
24+
enabled: true,
25+
provider: 'istanbul',
26+
},
27+
});
2328
```

packages/coverage-istanbul/package.json

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@
1919
"build": "rslib build",
2020
"dev": "rslib build --watch"
2121
},
22+
"peerDependencies": {
23+
"@rstest/core": "workspace:~"
24+
},
2225
"dependencies": {
2326
"swc-plugin-coverage-instrument": "^0.0.31",
2427
"istanbul-lib-coverage": "^3.2.2",
@@ -34,5 +37,18 @@
3437
"@types/istanbul-lib-coverage": "^2.0.6",
3538
"@types/istanbul-lib-report": "^3.0.3",
3639
"@types/istanbul-reports": "^3.0.4"
40+
},
41+
"keywords": [
42+
"rstest",
43+
"coverage",
44+
"istanbul"
45+
],
46+
"bugs": {
47+
"url": "https://github.com/web-infra-dev/rstest/issues"
48+
},
49+
"repository": {
50+
"type": "git",
51+
"url": "https://github.com/web-infra-dev/rstest",
52+
"directory": "packages/coverage-istanbul"
3753
}
3854
}

0 commit comments

Comments
 (0)