From 089816845e9532f562d83f89cc30ef8374b1cd93 Mon Sep 17 00:00:00 2001 From: Liam Date: Mon, 22 Apr 2024 18:45:42 -0400 Subject: [PATCH] Silence any lint on window.location mock --- assets/js/__tests__/ujs.spec.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/assets/js/__tests__/ujs.spec.ts b/assets/js/__tests__/ujs.spec.ts index 7f87b766..cef79c14 100644 --- a/assets/js/__tests__/ujs.spec.ts +++ b/assets/js/__tests__/ujs.spec.ts @@ -117,6 +117,7 @@ describe('Remote utilities', () => { // https://www.benmvp.com/blog/mocking-window-location-methods-jest-jsdom/ let oldWindowLocation: Location; + /* eslint-disable @typescript-eslint/no-explicit-any */ beforeAll(() => { oldWindowLocation = window.location; delete (window as any).location; @@ -136,6 +137,7 @@ describe('Remote utilities', () => { beforeEach(() => { (window.location.reload as any).mockReset(); }); + /* eslint-enable @typescript-eslint/no-explicit-any */ afterAll(() => { // restore window.location to the jsdom Location object