mirror of
https://github.com/terribleplan/next.js.git
synced 2024-01-19 02:48:18 +00:00
Jest example updated (#3123)
* jest example updated * reverted changes on yarn.lock
This commit is contained in:
parent
47d3cfd0fd
commit
474085b68a
|
@ -1,16 +1,21 @@
|
||||||
{
|
{
|
||||||
"name": "with-jest",
|
"name": "with-jest",
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
|
"jest": {
|
||||||
|
"setupFiles": [
|
||||||
|
"<rootDir>/shim.js"
|
||||||
|
]
|
||||||
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"next": "latest",
|
"next": "latest",
|
||||||
"react": "^15.5.4",
|
"react": "^16.0.0",
|
||||||
"react-dom": "^15.5.4"
|
"react-dom": "^16.0.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"enzyme": "^2.8.2",
|
"enzyme": "^2.8.2",
|
||||||
"jest": "^20.0.0",
|
"jest": "^21.0.0",
|
||||||
"react-addons-test-utils": "^15.5.1",
|
"react-addons-test-utils": "^15.6.0",
|
||||||
"react-test-renderer": "^15.5.4"
|
"react-test-renderer": "^16.0.0"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"test": "jest",
|
"test": "jest",
|
||||||
|
@ -18,4 +23,4 @@
|
||||||
"build": "next build",
|
"build": "next build",
|
||||||
"start": "next start"
|
"start": "next start"
|
||||||
}
|
}
|
||||||
}
|
}
|
3
examples/with-jest/shim.js
Normal file
3
examples/with-jest/shim.js
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
global.requestAnimationFrame = callback => {
|
||||||
|
setTimeout(callback, 0)
|
||||||
|
}
|
Loading…
Reference in a new issue