Created
January 13, 2019 17:09
-
-
Save BiosBoy/29b474f70ef141da0b783ed0c0965f5e to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // TODO: Remove these polyfills once the below issue is solved. | |
| // It present here to allow Jest work with the last React environment. | |
| // https://github.com/facebookincubator/create-react-app/issues/3199#issuecomment-332842582 | |
| global.requestAnimationFrame = cb => { | |
| setTimeout(cb, 0); | |
| }; | |
| global.matchMedia = window.matchMedia || function() { | |
| return { | |
| matches: false, | |
| addListener: () => {}, | |
| removeListener: () => {} | |
| }; | |
| }; | |
| import Enzyme from 'enzyme'; | |
| import Adapter from 'enzyme-adapter-react-16'; | |
| Enzyme.configure({ adapter: new Adapter() }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment