mirror of
https://github.com/philomena-dev/philomena.git
synced 2025-02-17 11:04:22 +01:00
Silence any lint on window.location mock
This commit is contained in:
parent
df2e336a24
commit
089816845e
1 changed files with 2 additions and 0 deletions
|
@ -117,6 +117,7 @@ describe('Remote utilities', () => {
|
||||||
// https://www.benmvp.com/blog/mocking-window-location-methods-jest-jsdom/
|
// https://www.benmvp.com/blog/mocking-window-location-methods-jest-jsdom/
|
||||||
let oldWindowLocation: Location;
|
let oldWindowLocation: Location;
|
||||||
|
|
||||||
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
||||||
beforeAll(() => {
|
beforeAll(() => {
|
||||||
oldWindowLocation = window.location;
|
oldWindowLocation = window.location;
|
||||||
delete (window as any).location;
|
delete (window as any).location;
|
||||||
|
@ -136,6 +137,7 @@ describe('Remote utilities', () => {
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
(window.location.reload as any).mockReset();
|
(window.location.reload as any).mockReset();
|
||||||
});
|
});
|
||||||
|
/* eslint-enable @typescript-eslint/no-explicit-any */
|
||||||
|
|
||||||
afterAll(() => {
|
afterAll(() => {
|
||||||
// restore window.location to the jsdom Location object
|
// restore window.location to the jsdom Location object
|
||||||
|
|
Loading…
Reference in a new issue