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:
5
test2/getScrollPosition/getScrollPosition.js
Normal file
5
test2/getScrollPosition/getScrollPosition.js
Normal file
@ -0,0 +1,5 @@
|
||||
const getScrollPosition = (el = window) => ({
|
||||
x: el.pageXOffset !== undefined ? el.pageXOffset : el.scrollLeft,
|
||||
y: el.pageYOffset !== undefined ? el.pageYOffset : el.scrollTop
|
||||
});
|
||||
module.exports = getScrollPosition;
|
||||
8
test2/getScrollPosition/getScrollPosition.test.js
Normal file
8
test2/getScrollPosition/getScrollPosition.test.js
Normal file
@ -0,0 +1,8 @@
|
||||
const expect = require('expect');
|
||||
const getScrollPosition = require('./getScrollPosition.js');
|
||||
|
||||
test('Testing getScrollPosition', () => {
|
||||
//For more information on all the methods supported by tape
|
||||
//Please go to https://github.com/substack/tape
|
||||
expect(typeof getScrollPosition === 'function').toBeTruthy();
|
||||
});
|
||||
Reference in New Issue
Block a user