Skip to content

Commit c8e6fb6

Browse files
authoredJan 2, 2023
feat!: split vitest into separate packages (#2575)
1 parent e641a11 commit c8e6fb6

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+1065
-509
lines changed
 

‎packages/expect/README.md

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# @vitest/expect
2+
3+
Jest's expect matchers as a Chai plugin.
4+
5+
## Usage
6+
7+
```js
8+
import * as chai from 'chai'
9+
import { JestAsymmetricMatchers, JestChaiExpect, JestExtend } from '@vitest/expect'
10+
11+
// allows using expect.extend instead of chai.use to extend plugins
12+
chai.use(JestExtend)
13+
// adds all jest matchers to expect
14+
chai.use(JestChaiExpect)
15+
// adds asymmetric matchers like stringContaining, objectContaining
16+
chai.use(JestAsymmetricMatchers)
17+
```

‎packages/expect/package.json

+37
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
{
2+
"name": "@vitest/expect",
3+
"type": "module",
4+
"version": "0.26.2",
5+
"description": "Jest's expect matchers as a Chai plugin",
6+
"license": "MIT",
7+
"repository": {
8+
"type": "git",
9+
"url": "git+https://github.com/vitest-dev/vitest.git",
10+
"directory": "packages/expect"
11+
},
12+
"sideEffects": false,
13+
"exports": {
14+
".": {
15+
"types": "./dist/index.d.ts",
16+
"import": "./dist/index.js"
17+
},
18+
"./*": "./*"
19+
},
20+
"main": "./dist/index.js",
21+
"module": "./dist/index.js",
22+
"types": "./dist/index.d.ts",
23+
"files": [
24+
"dist"
25+
],
26+
"scripts": {
27+
"build": "rimraf dist && rollup -c",
28+
"dev": "rollup -c --watch",
29+
"prepublishOnly": "pnpm build"
30+
},
31+
"dependencies": {
32+
"@vitest/spy": "workspace:*",
33+
"@vitest/utils": "workspace:*",
34+
"chai": "^4.3.7",
35+
"picocolors": "^1.0.0"
36+
}
37+
}

0 commit comments

Comments
 (0)
Please sign in to comment.