Skip to content

Commit 6d58159

Browse files
committed
✅ Replace ava with jest
1 parent 02462ac commit 6d58159

File tree

9 files changed

+730
-1068
lines changed

9 files changed

+730
-1068
lines changed

babel.config.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
const IS_DEV = process.env.NODE_ENV !== 'production'
2-
const IS_ESM = process.env.MODULES !== 'cjs'
2+
const IS_TEST = process.env.NODE_ENV === 'test'
3+
const IS_ESM = !IS_TEST && process.env.MODULES !== 'cjs'
34

45
module.exports = {
56
presets: [

jest.config.js

-3
This file was deleted.

package.json

+9-11
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
"watch": "run-p \"build:* -- -w\" \"test:unit -- -w\"",
3030
"prewatch": "npm run cleanup",
3131
"test": "run-s test:*",
32-
"test:unit": "cross-env MODULES=cjs ava test",
32+
"test:unit": "jest",
3333
"test:lint": "eslint src test",
3434
"deploy": "run-s deploy:*",
3535
"deploy:npm": "np --no-cleanup",
@@ -65,16 +65,13 @@
6565
"commitLimit": 10,
6666
"template": ".changelog.hbs"
6767
},
68-
"ava": {
69-
"verbose": true,
70-
"require": [
71-
"@babel/register"
68+
"jest": {
69+
"snapshotSerializers": [
70+
"jest-emotion/serializer"
7271
],
73-
"babel": {
74-
"testOptions": {
75-
"extends": "./babel.config.js"
76-
}
77-
}
72+
"testMatch": [
73+
"**/test/*.js"
74+
]
7875
},
7976
"peerDependencies": {
8077
"prop-types": "^15.0.0",
@@ -91,8 +88,9 @@
9188
"@babel/preset-react": "^7.0.0",
9289
"@babel/register": "^7.0.0",
9390
"auto-changelog": "^1.10.1",
94-
"ava": "^1.0.0-beta.8",
91+
"babel-core": "7.0.0-bridge.0",
9592
"babel-eslint": "^10.0.1",
93+
"babel-jest": "^23.6.0",
9694
"babel-plugin-emotion": "^9.2.10",
9795
"cross-env": "5.2.0",
9896
"docz": "^0.12.12",

0 commit comments

Comments
 (0)