Skip to content

Commit 73ebc09

Browse files
committed
🤖 fix: lint errors in test
Change-Id: I434d2bf3ba0d4ffb3736c7b66442f7a92f17820c Signed-off-by: Thomas Kosiewski <tk@coder.com>
1 parent 8622ea9 commit 73ebc09

File tree

1 file changed

+4
-10
lines changed

1 file changed

+4
-10
lines changed

src/browser/hooks/useAvailableScripts.test.ts

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -15,20 +15,13 @@ import { useAvailableScripts } from "./useAvailableScripts";
1515
// Define types for our mock
1616
type ListScriptsMock = Mock<() => Promise<{ success: boolean; data?: unknown[]; error?: string }>>;
1717

18-
interface CustomWindow extends Window {
19-
api?: {
20-
workspace: {
21-
listScripts: ListScriptsMock;
22-
};
23-
};
24-
}
25-
2618
describe("useAvailableScripts", () => {
2719
const mockListScripts = mock() as unknown as ListScriptsMock;
2820

2921
beforeEach(() => {
3022
// Mock window.api attached to the global window
31-
(global.window as unknown as CustomWindow).api = {
23+
// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-member-access
24+
(global.window as any).api = {
3225
workspace: {
3326
listScripts: mockListScripts,
3427
},
@@ -37,7 +30,8 @@ describe("useAvailableScripts", () => {
3730

3831
afterEach(() => {
3932
mock.restore();
40-
delete (global.window as unknown as CustomWindow).api;
33+
// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-member-access
34+
delete (global.window as any).api;
4135
});
4236

4337
it("should fetch and return executable scripts", async () => {

0 commit comments

Comments
 (0)