diff --git a/.travis.yml b/.travis.yml index ddba366d..214b6493 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,7 +8,7 @@ cache: notifications: email: false node_js: - - '7' + - '6' before_script: - npm prune && npm cache clean script: diff --git a/test/index.test.ts b/test/index.test.ts index a31f7c27..5b987493 100644 --- a/test/index.test.ts +++ b/test/index.test.ts @@ -1,18 +1,15 @@ import { Action, KeyCombo, shortcutJS } from '../src' import { getMockedEvent } from './utils' + /** * Mock window */ -interface MockWindow extends Window { - addEventListener: jest.Mock<{}> & typeof window.addEventListener - removeEventListener: jest.Mock<{}> & typeof window.removeEventListener -} function getMockWindow() { let myGlobal = global as any myGlobal.addEventListener = jest.fn() myGlobal.removeEventListener = jest.fn() - return myGlobal + return myGlobal as any } /**