requestAnimationFrame polyfill for react tests
This commit is contained in:
36
package.json
36
package.json
@@ -4,8 +4,10 @@
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
"clean": "rimraf dist",
|
||||
"build:webpack": "NODE_ENV=production webpack --config webpack.config.prod.js",
|
||||
"build:analyze": "NODE_ENV=production webpack --config webpack.config.prod.js --json | webpack-bundle-size-analyzer",
|
||||
"build:webpack":
|
||||
"NODE_ENV=production webpack --config webpack.config.prod.js",
|
||||
"build:analyze":
|
||||
"NODE_ENV=production webpack --config webpack.config.prod.js --json | webpack-bundle-size-analyzer",
|
||||
"build": "npm run clean && npm run build:webpack",
|
||||
"start": "NODE_ENV=production node index.js",
|
||||
"dev": "NODE_ENV=development nodemon --inspect --watch server index.js",
|
||||
@@ -18,38 +20,27 @@
|
||||
"sequelize:migrate": "sequelize db:migrate",
|
||||
"test": "npm run test:app && npm run test:server",
|
||||
"test:app": "jest",
|
||||
"test:server": "jest --config=server/.jestconfig.json --runInBand --forceExit",
|
||||
"test:server":
|
||||
"jest --config=server/.jestconfig.json --runInBand --forceExit",
|
||||
"precommit": "lint-staged"
|
||||
},
|
||||
"lint-staged": {
|
||||
"*.js": [
|
||||
"eslint --fix",
|
||||
"git add"
|
||||
]
|
||||
"*.js": ["eslint --fix", "git add"]
|
||||
},
|
||||
"jest": {
|
||||
"verbose": false,
|
||||
"roots": [
|
||||
"app"
|
||||
],
|
||||
"roots": ["app"],
|
||||
"moduleNameMapper": {
|
||||
"^.*[.](s?css|css)$": "<rootDir>/__mocks__/styleMock.js",
|
||||
"^.*[.](gif|ttf|eot|svg)$": "<rootDir>/__test__/fileMock.js"
|
||||
},
|
||||
"moduleFileExtensions": [
|
||||
"js",
|
||||
"jsx",
|
||||
"json"
|
||||
],
|
||||
"moduleDirectories": [
|
||||
"node_modules"
|
||||
],
|
||||
"modulePaths": [
|
||||
"app"
|
||||
],
|
||||
"moduleFileExtensions": ["js", "jsx", "json"],
|
||||
"moduleDirectories": ["node_modules"],
|
||||
"modulePaths": ["app"],
|
||||
"setupFiles": [
|
||||
"<rootDir>/setupJest.js",
|
||||
"<rootDir>/__mocks__/window.js"
|
||||
"<rootDir>/__mocks__/window.js",
|
||||
"raf/polyfill"
|
||||
]
|
||||
},
|
||||
"engines": {
|
||||
@@ -189,6 +180,7 @@
|
||||
"lint-staged": "^3.4.0",
|
||||
"nodemon": "1.11.0",
|
||||
"prettier": "1.8.2",
|
||||
"raf": "^3.4.0",
|
||||
"react-test-renderer": "^16.1.0"
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user