1
0
mirror of https://github.com/webslides/WebSlides.git synced 2025-08-27 06:54:31 +02:00
This commit is contained in:
Antonio Laguna
2017-05-29 10:16:40 +02:00
parent 8a9ea037c0
commit c5ee83c940
17 changed files with 147 additions and 255 deletions

View File

@@ -4,7 +4,8 @@ import AutoSlide from '../../src/js/plugins/autoslide';
jest.useFakeTimers();
beforeAll(() => {
document.body.innerHTML = `<div id="webslides"></div><input id="focusable" />`;
document.body.innerHTML =
`<div id="webslides"></div><input id="focusable" />`;
});
test('AutoSlide plugin', () => {
@@ -20,7 +21,7 @@ test('AutoSlide plugin', () => {
expect(next).not.toBeCalled();
const autoslide = new AutoSlide(webslides);
new AutoSlide(webslides);
DOM.fireEvent(ws, 'ws:init');
// Wait until next execution
@@ -39,5 +40,4 @@ test('AutoSlide plugin', () => {
jest.runTimersToTime(101);
expect(next.mock.calls.length).toBe(2);
});