Skip to content

Commit fef61df

Browse files
author
Markus Günther
committed
TASK: Use polyfill to suppress ReactAnimationFrame warning
1 parent 0195835 commit fef61df

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

test/setup.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1+
import raf from './tempPolyfills'
12
import { jsdom } from 'jsdom'
23

3-
process.env.NODE_ENV = 'TESTING'
44
global.document = jsdom('<!doctype html><html><body></body></html>')
55
global.window = document.defaultView
66
global.navigator = global.window.navigator

test/tempPolyfills.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
const raf = global.requestAnimationFrame = (cb) => {
2+
setTimeout(cb, 0)
3+
}
4+
5+
export default raf

0 commit comments

Comments
 (0)