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:
8
test6/scrollToTop/scrollToTop.js
Normal file
8
test6/scrollToTop/scrollToTop.js
Normal file
@ -0,0 +1,8 @@
|
||||
const scrollToTop = () => {
|
||||
const c = document.documentElement.scrollTop || document.body.scrollTop;
|
||||
if (c > 0) {
|
||||
window.requestAnimationFrame(scrollToTop);
|
||||
window.scrollTo(0, c - c / 8);
|
||||
}
|
||||
};
|
||||
module.exports = scrollToTop;
|
||||
Reference in New Issue
Block a user