diff --git a/src/main/window/clipboard-ipc-handlers.test.ts b/src/main/window/clipboard-ipc-handlers.test.ts index e9d8e9470bb..99fd03548c1 100644 --- a/src/main/window/clipboard-ipc-handlers.test.ts +++ b/src/main/window/clipboard-ipc-handlers.test.ts @@ -202,16 +202,13 @@ describe('registerClipboardHandlers', () => { childStdinEndMock.mockClear() resolveAuthorizedPathMock.mockReset() resolveAuthorizedPathMock.mockImplementation(async (path: string) => path) - fsAccessMock.mockReset() - fsAccessMock.mockResolvedValue(undefined) - fsLstatMock.mockReset() - fsLstatMock.mockResolvedValue({ + fsAccessMock.mockReset().mockResolvedValue(undefined) + fsLstatMock.mockReset().mockResolvedValue({ uid: typeof process.getuid === 'function' ? process.getuid() : 0, isDirectory: () => true, isSymbolicLink: () => false }) - fsMkdirMock.mockReset() - fsMkdirMock.mockResolvedValue(undefined) + fsMkdirMock.mockReset().mockResolvedValue(undefined) fsOpendirMock.mockReset() // Why: handler registration kicks off the expired-staging sweep; an empty temp root keeps it inert. fsOpendirMock.mockImplementation(async () => ({