Skip to content
This repository has been archived by the owner on Jan 1, 2024. It is now read-only.

Commit

Permalink
chore(jest_config): shim requestAnimationFrame in dev
Browse files Browse the repository at this point in the history
chore(jest_config): shim requestAnimationFrame in dev
  • Loading branch information
Metnew committed Nov 10, 2017
1 parent ca11261 commit b922999
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions jest_config/setupJest.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@ import {configure} from 'enzyme'
import Adapter from 'enzyme-adapter-react-16'

global.fetch = require('isomorphic-fetch')
/** {@link: https://reactjs.org/blog/2017/09/26/react-v16.0.html#javascript-environment-requirements} */
global.requestAnimationFrame = function (cb) {
setTimeout(cb, 0)
}
process.env.BASE_API = process.env.BASE_API || 'http://localhost:3000/api/v1'
process.env.BROWSER = false

Expand Down

0 comments on commit b922999

Please sign in to comment.