Test migration to jest by hand
Apparently using regular expressions is way easier.
This commit is contained in:
5
test/getScrollPosition/getScrollPosition.js
Normal file
5
test/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;
|
||||
10
test/getScrollPosition/getScrollPosition.test.js
Normal file
10
test/getScrollPosition/getScrollPosition.test.js
Normal file
@ -0,0 +1,10 @@
|
||||
const expect = require('expect');
|
||||
const getScrollPosition = require('./getScrollPosition.js');
|
||||
|
||||
|
||||
test('getScrollPosition is a Function', () => {
|
||||
expect(getScrollPosition).toBeInstanceOf(Function);
|
||||
});
|
||||
t.pass('Tested by @chalarangelo on 16/02/2018');
|
||||
|
||||
|
||||
Reference in New Issue
Block a user