From 6e54729f467e217eba255b93d755ef2047c353c0 Mon Sep 17 00:00:00 2001 From: Francisco Hodge Date: Thu, 7 Mar 2019 07:32:15 -0500 Subject: [PATCH] Tests update --- src/lib/components/tests/Keyboard.test.js | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/src/lib/components/tests/Keyboard.test.js b/src/lib/components/tests/Keyboard.test.js index 39b77b19..2fe56223 100644 --- a/src/lib/components/tests/Keyboard.test.js +++ b/src/lib/components/tests/Keyboard.test.js @@ -1023,6 +1023,23 @@ it('Keyboard beforeFirstRender method will work', () => { expect(timesCalled).toBe(1); }); +it('Keyboard beforeFirstRender will show PointerEvents warning', () => { + testUtil.setDOM(); + + let timesCalled = 0; + + window.PointerEvent = window.PointerEvent ? window.PointerEvent : () => {}; + + let keyboard = new Keyboard({ + debug: true, + beforeFirstRender: () => { + timesCalled++; + } + }); + + expect(timesCalled).toBe(1); +}); + it('Keyboard beforeRender method will work', () => { testUtil.setDOM();