Skip to content

Commit

Permalink
Merge pull request #20 from geoffrich/fix-ts
Browse files Browse the repository at this point in the history
Resolve TS errors in tests
  • Loading branch information
swyxio authored Feb 6, 2021
2 parents 65beaa1 + 1da9dfc commit 514f303
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/preventTabClose.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ describe('preventTabClose', function() {
window.dispatchEvent(event);

assert.ok(preventDefaultSpy.calledOnce);
assert.ok(returnValSpy.set.calledWith(''));
assert.ok(returnValSpy.set.calledWith('' as any));
});

it('does not cancel beforeunload event when disabled', function() {
Expand Down
2 changes: 1 addition & 1 deletion src/test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import * as jsdom from 'jsdom';

const window = new jsdom.JSDOM('<main></main>').window;
global.document = window.document;
global.window = window;
global.window = window as any;
global.CustomEvent = window.CustomEvent;
global.HTMLElement = window.HTMLElement;

Expand Down

0 comments on commit 514f303

Please sign in to comment.