mirror of
https://github.com/terribleplan/next.js.git
synced 2024-01-19 02:48:18 +00:00
parent
e8f39ad74c
commit
25005d158b
|
@ -1,16 +1,13 @@
|
|||
{
|
||||
"env": {
|
||||
"development": {
|
||||
"presets": "next/babel"
|
||||
"presets": ["next/babel"]
|
||||
},
|
||||
"production": {
|
||||
"presets": "next/babel"
|
||||
"presets": ["next/babel"]
|
||||
},
|
||||
"test": {
|
||||
"presets": [
|
||||
["env", { "modules": "commonjs" }],
|
||||
"next/babel"
|
||||
]
|
||||
"presets": [["env", { "modules": "commonjs" }], "next/babel"]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,12 +2,12 @@
|
|||
|
||||
exports[`With Snapshot Testing App shows "Hello world!" 1`] = `
|
||||
<div
|
||||
data-jsx={2648947580}
|
||||
className="jsx-2982525546"
|
||||
>
|
||||
<p
|
||||
data-jsx={2648947580}
|
||||
className="jsx-2982525546"
|
||||
>
|
||||
Hello World!
|
||||
</p>
|
||||
</div>
|
||||
`;
|
||||
`
|
||||
|
|
4
examples/with-jest/jest.config.js
Normal file
4
examples/with-jest/jest.config.js
Normal file
|
@ -0,0 +1,4 @@
|
|||
module.exports = {
|
||||
setupFiles: ['<rootDir>/jest.setup.js'],
|
||||
testPathIgnorePatterns: ['<rootDir>/.next/', '<rootDir>/node_modules/']
|
||||
}
|
5
examples/with-jest/jest.setup.js
Normal file
5
examples/with-jest/jest.setup.js
Normal file
|
@ -0,0 +1,5 @@
|
|||
import 'raf/polyfill'
|
||||
import { configure } from 'enzyme'
|
||||
import Adapter from 'enzyme-adapter-react-16'
|
||||
|
||||
configure({ adapter: new Adapter() })
|
|
@ -1,26 +1,23 @@
|
|||
{
|
||||
"name": "with-jest",
|
||||
"version": "1.0.0",
|
||||
"jest": {
|
||||
"setupFiles": [
|
||||
"<rootDir>/shim.js"
|
||||
]
|
||||
},
|
||||
"dependencies": {
|
||||
"next": "latest",
|
||||
"react": "^16.0.0",
|
||||
"react-dom": "^16.0.0"
|
||||
"react": "16.2.0",
|
||||
"react-dom": "16.2.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"enzyme": "^2.8.2",
|
||||
"jest": "^21.0.0",
|
||||
"react-addons-test-utils": "^15.6.0",
|
||||
"react-test-renderer": "^16.0.0"
|
||||
"enzyme": "3.2.0",
|
||||
"enzyme-adapter-react-16": "1.1.0",
|
||||
"jest": "21.2.1",
|
||||
"raf": "3.4.0",
|
||||
"react-addons-test-utils": "15.6.2",
|
||||
"react-test-renderer": "16.2.0"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "jest",
|
||||
"test": "NODE_ENV=test jest",
|
||||
"dev": "next",
|
||||
"build": "next build",
|
||||
"start": "next start"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,3 +0,0 @@
|
|||
global.requestAnimationFrame = callback => {
|
||||
setTimeout(callback, 0)
|
||||
}
|
Loading…
Reference in a new issue