Skip to content
This repository has been archived by the owner on May 10, 2021. It is now read-only.

Commit

Permalink
Silence Jest warning about polyfills
Browse files Browse the repository at this point in the history
  • Loading branch information
rgarner committed Nov 27, 2017
1 parent a3fd095 commit 1b50cd8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
3 changes: 3 additions & 0 deletions app/javascript/support/requestAnimationFrameTestShim.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
global.requestAnimationFrame = (callback) => {
setTimeout(callback, 0)
}
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,13 +60,15 @@
"webpack-dev-server": "^2.5.0"
},
"jest": {
"testPathIgnorePatterns": ["/node_modules/", "/config/webpack/test.js"]
"testPathIgnorePatterns": ["/node_modules/", "/config/webpack/test.js"],
"setupFiles": ["./app/javascript/support/requestAnimationFrameTestShim.js"]
},
"scripts": {
"lint": "npm run lint:styles && npm run lint:js",
"lint:js": "eslint ./app ./config ./spec *.js",
"lint:styles": "sass-lint -c .sass-lint.yml 'app/assets/stylesheets/**/*.scss' -v -q",
"test:unit": "mocha ./spec/javascript --opts ./spec/javascript/mocha.opts",
"test:unit:watch": "mocha ./spec/javascript --opts ./spec/javascript/mocha.opts --watch",
"test:jest": "jest app/javascript/components/**/*.js",
"test:jest:watch": "jest --watch app/javascript/components/**/*.test.js"
}
Expand Down

0 comments on commit 1b50cd8

Please sign in to comment.