Skip to content

Commit 9199308

Browse files
committed
Fix lint errors: add eslint-disable for await-thenable and no-unsafe-assignment
1 parent d6cc0aa commit 9199308

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

src/browser/api.test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,7 @@ describe("Browser API invokeIPC", () => {
101101

102102
const invokeIPC = createInvokeIPC(mockFetch);
103103

104+
// eslint-disable-next-line @typescript-eslint/await-thenable
104105
await expect(invokeIPC("WORKSPACE_REMOVE", "test-workspace", { force: false })).rejects.toThrow(
105106
"HTTP error! status: 500"
106107
);

src/services/initStateManager.test.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,9 @@ describe("InitStateManager", () => {
5353
manager.appendOutput(workspaceId, "Installing deps...", false);
5454
manager.appendOutput(workspaceId, "Done!", false);
5555
expect(manager.getInitState(workspaceId)?.lines).toEqual([
56+
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
5657
{ line: "Installing deps...", isError: false, timestamp: expect.any(Number) },
58+
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
5759
{ line: "Done!", isError: false, timestamp: expect.any(Number) },
5860
]);
5961

@@ -79,7 +81,9 @@ describe("InitStateManager", () => {
7981

8082
const state = manager.getInitState(workspaceId);
8183
expect(state?.lines).toEqual([
84+
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
8285
{ line: "stdout line", isError: false, timestamp: expect.any(Number) },
86+
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
8387
{ line: "stderr line", isError: true, timestamp: expect.any(Number) },
8488
]);
8589
});
@@ -109,7 +113,9 @@ describe("InitStateManager", () => {
109113
expect(diskState?.status).toBe("success");
110114
expect(diskState?.exitCode).toBe(0);
111115
expect(diskState?.lines).toEqual([
116+
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
112117
{ line: "Line 1", isError: false, timestamp: expect.any(Number) },
118+
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
113119
{ line: "Line 2", isError: true, timestamp: expect.any(Number) },
114120
]);
115121
});
@@ -237,6 +243,7 @@ describe("InitStateManager", () => {
237243
expect(manager.getInitState(workspaceId)).toBeUndefined();
238244

239245
// Verify the promise was rejected
246+
// eslint-disable-next-line @typescript-eslint/await-thenable
240247
await expect(initPromise).rejects.toThrow("Workspace test-workspace was deleted");
241248
});
242249
});

0 commit comments

Comments
 (0)