mirror of
https://github.com/jxnblk/mdx-deck.git
synced 2024-11-05 06:06:17 +03:00
Adjust test setup
This commit is contained in:
parent
e7fbc41db4
commit
d86cf0914d
35
package.json
35
package.json
@ -13,26 +13,51 @@
|
||||
"cypress:open": "cypress open",
|
||||
"cypress:run": "cypress run",
|
||||
"test:dev": "start-server-and-test start http://localhost:8000 cypress:open",
|
||||
"test": "start-server-and-test start http://localhost:8000 cypress:run"
|
||||
"jest": "jest",
|
||||
"test": "jest && start-server-and-test start http://localhost:8000 cypress:run"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/core": "^7.8.4",
|
||||
"@babel/preset-env": "^7.8.4",
|
||||
"@babel/preset-react": "^7.8.3",
|
||||
"@testing-library/react": "^9.4.0",
|
||||
"cypress": "^3.4.0",
|
||||
"husky": "^4.2.1",
|
||||
"jest": "^24.3.1",
|
||||
"jest": "^25.1.0",
|
||||
"jest-emotion": "^10.0.27",
|
||||
"lerna": "^3.13.1",
|
||||
"lint-staged": "^10.0.4",
|
||||
"prettier": "^1.16.4",
|
||||
"react-test-renderer": "^16.12.0",
|
||||
"start-server-and-test": "^1.9.1"
|
||||
},
|
||||
"jest": {
|
||||
"coverageReporters": [
|
||||
"lcov",
|
||||
"html"
|
||||
"testMatch": [
|
||||
"**/packages/**/test/*.js"
|
||||
],
|
||||
"testPathIgnorePatterns": [
|
||||
"/node_modules/",
|
||||
"/.cache/",
|
||||
"/public/"
|
||||
],
|
||||
"coverageReporters": [
|
||||
"lcov",
|
||||
"text",
|
||||
"html"
|
||||
],
|
||||
"collectCoverageFrom": [
|
||||
"packages/**/src/**/*.js"
|
||||
],
|
||||
"coverageThreshold": {
|
||||
"global": {
|
||||
"branches": 80,
|
||||
"functions": 80,
|
||||
"lines": 80,
|
||||
"statements": 80
|
||||
}
|
||||
},
|
||||
"snapshotSerializers": [
|
||||
"jest-emotion"
|
||||
]
|
||||
},
|
||||
"husky": {
|
||||
|
@ -6,8 +6,7 @@
|
||||
"license": "MIT",
|
||||
"repository": "github:jxnblk/mdx-deck",
|
||||
"scripts": {
|
||||
"start": "gatsby develop --open",
|
||||
"test": "jest"
|
||||
"start": "gatsby develop --open"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"gatsby": "^2.14.0",
|
||||
@ -25,44 +24,5 @@
|
||||
"remark-images": "^1.0.0",
|
||||
"remark-unwrap-images": "^1.0.0",
|
||||
"theme-ui": "^0.3.0-alpha.6"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/core": "^7.8.4",
|
||||
"@babel/preset-env": "^7.8.4",
|
||||
"@babel/preset-react": "^7.8.3",
|
||||
"@testing-library/react": "^9.4.0",
|
||||
"cypress": "^3.4.0",
|
||||
"jest": "^25.1.0",
|
||||
"jest-emotion": "^10.0.27",
|
||||
"lerna": "^3.13.1",
|
||||
"react-test-renderer": "^16.12.0"
|
||||
},
|
||||
"jest": {
|
||||
"testMatch": [
|
||||
"**/test/*.js"
|
||||
],
|
||||
"testPathIgnorePatterns": [
|
||||
"/node_modules/",
|
||||
"/fixtures/"
|
||||
],
|
||||
"snapshotSerializers": [
|
||||
"jest-emotion"
|
||||
],
|
||||
"coverageReporters": [
|
||||
"lcov",
|
||||
"text",
|
||||
"html"
|
||||
],
|
||||
"collectCoverageFrom": [
|
||||
"**/src/**/*.js"
|
||||
],
|
||||
"coverageThreshold": {
|
||||
"global": {
|
||||
"branches": 80,
|
||||
"functions": 80,
|
||||
"lines": 80,
|
||||
"statements": 80
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -18,11 +18,12 @@ const Comp = ({
|
||||
originalType,
|
||||
mdxType,
|
||||
...props
|
||||
}) => <div {...props} />
|
||||
}) => React.createElement(originalType, props)
|
||||
|
||||
const x = (tag, props, children) =>
|
||||
React.createElement(Comp, {
|
||||
key: __key++,
|
||||
tag,
|
||||
originalType: tag,
|
||||
mdxType: tag,
|
||||
...props
|
||||
|
Loading…
Reference in New Issue
Block a user