UNPKG

444 BJavaScriptView Raw
1'use strict'
2
3import 'promise-polyfill/src/polyfill'
4
5// Object.assign() is commonly used with React.
6// It will use the native implementation if it's present and isn't buggy.
7Object.assign = require('object-assign')
8
9// In tests, polyfill requestAnimationFrame since jsdom doesn't provide it yet.
10// We don't polyfill it in the browser--this is user's responsibility.
11if (process.env.NODE_ENV === 'test') {
12 require('raf').polyfill(global)
13}