Skip to content

Commit

Permalink
Cleanup: silence requestAnimationFrame warning output in test env
Browse files Browse the repository at this point in the history
  - community practice found at jestjs/jest#4545 (comment)
  • Loading branch information
vanderhoop committed Nov 29, 2017
1 parent a010d69 commit ee3a49c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion test/mocha.opts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ test/**/*_test.js
--require mock-css-modules
--require babel-register
--require=env-test
--require jsdom-global/register
--require test/support/js/test_helper.js
--require jsdom-global/register
--reporter dot
4 changes: 4 additions & 0 deletions test/support/js/test_helper.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ Enzyme.configure({ adapter: new Adapter() })
global.hj = noop
global.expect = expect

global.requestAnimationFrame = callback => {
setTimeout(callback, 0)
}

global.mountWithConnectedSubcomponents = (component, options) => {
const store = {
subscribe: () => {},
Expand Down

0 comments on commit ee3a49c

Please sign in to comment.