Skip to content

Commit aaf7758

Browse files
authored
chore: standardize packages README (#9776)
1 parent d0ee546 commit aaf7758

File tree

23 files changed

+181
-41
lines changed

23 files changed

+181
-41
lines changed

packages/browser/package.json

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"description": "Browser running for Vitest",
66
"license": "MIT",
77
"funding": "https://opencollective.com/vitest",
8-
"homepage": "https://github.com/vitest-dev/vitest/tree/main/packages/browser#readme",
8+
"homepage": "https://vitest.dev/guide/browser/",
99
"repository": {
1010
"type": "git",
1111
"url": "git+https://github.com/vitest-dev/vitest.git",
@@ -14,6 +14,12 @@
1414
"bugs": {
1515
"url": "https://github.com/vitest-dev/vitest/issues"
1616
},
17+
"keywords": [
18+
"vitest",
19+
"test",
20+
"browser",
21+
"component"
22+
],
1723
"sideEffects": false,
1824
"exports": {
1925
".": {
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# @vitest/coverage-istanbul
2+
3+
[![NPM version](https://img.shields.io/npm/v/@vitest/coverage-istanbul?color=a1b858&label=)](https://www.npmjs.com/package/@vitest/coverage-istanbul)
4+
5+
Vitest coverage provider that instruments code coverage via [istanbul](https://istanbul.js.org/).
6+
7+
## Installation
8+
9+
After installing the package, specify `istanbul` in the `coverage.provider` field of your Vitest configuration:
10+
11+
```ts
12+
// vitest.config.ts
13+
import { defineConfig } from 'vitest/config'
14+
15+
export default defineConfig({
16+
test: {
17+
coverage: {
18+
provider: 'istanbul',
19+
},
20+
},
21+
})
22+
```
23+
24+
Then run Vitest with coverage:
25+
26+
```sh
27+
npx vitest --coverage
28+
```
29+
30+
[GitHub](https://github.com/vitest-dev/vitest/tree/main/packages/coverage-istanbul) | [Documentation](https://vitest.dev/guide/coverage)

packages/coverage-istanbul/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"author": "Anthony Fu <anthonyfu117@hotmail.com>",
77
"license": "MIT",
88
"funding": "https://opencollective.com/vitest",
9-
"homepage": "https://github.com/vitest-dev/vitest/tree/main/packages/coverage-istanbul#readme",
9+
"homepage": "https://vitest.dev/guide/coverage",
1010
"repository": {
1111
"type": "git",
1212
"url": "git+https://github.com/vitest-dev/vitest.git",

packages/coverage-v8/README.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# @vitest/coverage-v8
2+
3+
[![NPM version](https://img.shields.io/npm/v/@vitest/coverage-v8?color=a1b858&label=)](https://www.npmjs.com/package/@vitest/coverage-v8)
4+
5+
Vitest coverage provider that supports native code coverage via [v8](https://v8.dev/blog/javascript-code-coverage).
6+
7+
## Installation
8+
9+
After installing the package, specify `v8` in the `coverage.provider` field of your Vitest configuration (or leave it empty as it is the default provider):
10+
11+
```ts
12+
// vitest.config.ts
13+
import { defineConfig } from 'vitest/config'
14+
15+
export default defineConfig({
16+
test: {
17+
coverage: {
18+
provider: 'v8',
19+
},
20+
},
21+
})
22+
```
23+
24+
Then run Vitest with coverage:
25+
26+
```sh
27+
npx vitest --coverage
28+
```
29+
30+
[GitHub](https://github.com/vitest-dev/vitest/tree/main/packages/coverage-v8) | [Documentation](https://vitest.dev/guide/coverage)

packages/coverage-v8/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"author": "Anthony Fu <anthonyfu117@hotmail.com>",
77
"license": "MIT",
88
"funding": "https://opencollective.com/vitest",
9-
"homepage": "https://github.com/vitest-dev/vitest/tree/main/packages/coverage-v8#readme",
9+
"homepage": "https://vitest.dev/guide/coverage",
1010
"repository": {
1111
"type": "git",
1212
"url": "git+https://github.com/vitest-dev/vitest.git",

packages/expect/README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# @vitest/expect
22

3+
[![NPM version](https://img.shields.io/npm/v/@vitest/runner?color=a1b858&label=)](https://www.npmjs.com/package/@vitest/runner)
4+
35
Jest's expect matchers as a Chai plugin.
46

57
## Usage
@@ -19,3 +21,5 @@ chai.use(JestChaiExpect)
1921
// adds asymmetric matchers like stringContaining, objectContaining
2022
chai.use(JestAsymmetricMatchers)
2123
```
24+
25+
[GitHub](https://github.com/vitest-dev/vitest/tree/main/packages/expect) | [Documentation](https://vitest.dev/api/expect)

packages/expect/package.json

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"description": "Jest's expect matchers as a Chai plugin",
66
"license": "MIT",
77
"funding": "https://opencollective.com/vitest",
8-
"homepage": "https://github.com/vitest-dev/vitest/tree/main/packages/expect#readme",
8+
"homepage": "https://vitest.dev/api/expect",
99
"repository": {
1010
"type": "git",
1111
"url": "git+https://github.com/vitest-dev/vitest.git",
@@ -14,6 +14,12 @@
1414
"bugs": {
1515
"url": "https://github.com/vitest-dev/vitest/issues"
1616
},
17+
"keywords": [
18+
"vitest",
19+
"test",
20+
"chai",
21+
"assertion"
22+
],
1723
"sideEffects": false,
1824
"exports": {
1925
".": {

packages/mocker/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# @vitest/mocker
22

3+
[![NPM version](https://img.shields.io/npm/v/@vitest/mocker?color=a1b858&label=)](https://www.npmjs.com/package/@vitest/mocker)
4+
35
Vitest's module mocker implementation.
46

57
[GitHub](https://github.com/vitest-dev/vitest/blob/main/packages/mocker/) | [Documentation](https://github.com/vitest-dev/vitest/blob/main/packages/mocker/EXPORTS.md)

packages/mocker/package.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"description": "Vitest module mocker implementation",
66
"license": "MIT",
77
"funding": "https://opencollective.com/vitest",
8-
"homepage": "https://github.com/vitest-dev/vitest/tree/main/packages/mocker#readme",
8+
"homepage": "https://github.com/vitest-dev/vitest/tree/main/packages/mocker",
99
"repository": {
1010
"type": "git",
1111
"url": "git+https://github.com/vitest-dev/vitest.git",
@@ -14,6 +14,11 @@
1414
"bugs": {
1515
"url": "https://github.com/vitest-dev/vitest/issues"
1616
},
17+
"keywords": [
18+
"vitest",
19+
"test",
20+
"mock"
21+
],
1722
"sideEffects": false,
1823
"exports": {
1924
".": {

packages/pretty-format/README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# @vitest/pretty-format
2+
3+
[![NPM version](https://img.shields.io/npm/v/@vitest/pretty-format?color=a1b858&label=)](https://www.npmjs.com/package/@vitest/pretty-format)
4+
5+
Jest's `pretty-format` implementation that only supports ESM.
6+
7+
[GitHub](https://github.com/vitest-dev/vitest/tree/main/packages/pretty-format) | [Documentation](https://vitest.dev/)

0 commit comments

Comments
 (0)