fix(renderer): migrate File.path reads to webUtils.getPathForFile for Electron 41

This commit is contained in:
2026-08-23 19:31:33 +05:30
parent 5fcc282fe0
commit c6ec1cef64
8 changed files with 185 additions and 22 deletions
+2
View File
@@ -11,6 +11,8 @@ global.window.electronAPI = {
once: jest.fn(),
invoke: jest.fn(() => Promise.resolve(null)),
removeAllListeners: jest.fn(),
// webUtils.getPathForFile bridge (File.path was removed in Electron 32)
getFilePath: jest.fn((file) => file && file.path),
file: {
save: jest.fn(),
saveCurrent: jest.fn(),