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;
|
||||
8
test6/scrollToTop/scrollToTop.test.js
Normal file
8
test6/scrollToTop/scrollToTop.test.js
Normal file
@ -0,0 +1,8 @@
|
||||
const expect = require('expect');
|
||||
const scrollToTop = require('./scrollToTop.js');
|
||||
|
||||
test('Testing scrollToTop', () => {
|
||||
//For more information on all the methods supported by tape
|
||||
//Please go to https://github.com/substack/tape
|
||||
expect(typeof scrollToTop === 'function').toBeTruthy();
|
||||
});
|
||||
Reference in New Issue
Block a user