mirror of
https://github.com/webslides/WebSlides.git
synced 2025-08-18 02:41:37 +02:00
Removing unneeded trickery
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
import scrollTo from '../../src/js/utils/scroll-to';
|
||||
|
||||
jest.useFakeTimers();
|
||||
|
||||
beforeAll(() => {
|
||||
@@ -7,11 +9,9 @@ beforeAll(() => {
|
||||
|
||||
test('ScrollTo utility', () => {
|
||||
const ws = document.getElementById('webslides');
|
||||
// Needs to be required and not imported because const defined in top level
|
||||
const scrollTo = require('../../src/js/utils/scroll-to');
|
||||
const cb = jest.fn();
|
||||
|
||||
scrollTo.default(100, 500, cb);
|
||||
scrollTo(100, 500, cb);
|
||||
|
||||
expect(cb).not.toBeCalled();
|
||||
expect(ws.scrollTop).toBe(0);
|
||||
|
Reference in New Issue
Block a user