Migrated tests to jest
Used jest-codemods to migrate, will have to pass everything by hand before we can merge.
This commit is contained in:
@ -1,15 +0,0 @@
|
||||
const onUserInputChange = callback => {
|
||||
let type = 'mouse',
|
||||
lastTime = 0;
|
||||
const mousemoveHandler = () => {
|
||||
const now = performance.now();
|
||||
if (now - lastTime < 20)
|
||||
(type = 'mouse'), callback(type), document.removeEventListener('mousemove', mousemoveHandler);
|
||||
lastTime = now;
|
||||
};
|
||||
document.addEventListener('touchstart', () => {
|
||||
if (type === 'touch') return;
|
||||
(type = 'touch'), callback(type), document.addEventListener('mousemove', mousemoveHandler);
|
||||
});
|
||||
};
|
||||
module.exports = onUserInputChange;
|
||||
Reference in New Issue
Block a user