diff --git a/test/plugins/click-nav.test.js b/test/plugins/click-nav.test.js index 96d4737..010b06c 100644 --- a/test/plugins/click-nav.test.js +++ b/test/plugins/click-nav.test.js @@ -9,8 +9,7 @@ beforeAll(() => { test('Click nav plugin', () => { const next = jest.fn(); const ws = document.getElementById('webslides'); - // Simulates dataset - ws.dataset = {}; + const webslides = { options: { changeOnClick: true diff --git a/test/plugins/youtube.test.js b/test/plugins/youtube.test.js index 2773675..23fa642 100644 --- a/test/plugins/youtube.test.js +++ b/test/plugins/youtube.test.js @@ -44,10 +44,10 @@ test('YouTube utility', () => { new YouTube(webslides); expect(typeof window.onYouTubeIframeAPIReady).toBe('function'); - webslides.el.querySelector('[data-youtube]').dataset = { - autoplay: true, - youtubeId: 'CQY3KUR3VzM' - }; + const el = webslides.el.querySelector('[data-youtube]'); + + el.dataset.autoplay = true; + el.dataset.youtubeId = 'CQY3KUR3VzM'; window.onYouTubeIframeAPIReady(); diff --git a/test/utils/hash.test.js b/test/utils/hash.test.js index 9479b87..044172e 100644 --- a/test/utils/hash.test.js +++ b/test/utils/hash.test.js @@ -8,8 +8,8 @@ describe('Hash utility', () => { document.location.hash = '#slide=1'; const goto = jest.fn(); const ws = document.getElementById('webslides'); - // Simulates dataset - ws.dataset = {}; + + const webslides = { options: { changeOnClick: true