Skip to content

Commit 552953f

Browse files
committed
test(electron-mocks): replace mockImplementation with mockReturnValue for getPath
1 parent 8241e17 commit 552953f

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

electron/main/account/__tests__/account-instance.test.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ vi.mock('../../cache/disk-cache.service.js', async () => {
3232
vi.mock('electron', async () => {
3333
return {
3434
app: {
35-
getPath: vi.fn().mockImplementation(() => 'userData'),
35+
getPath: vi.fn().mockReturnValue('userData'),
3636
},
3737
};
3838
});

electron/main/game/__tests__/game-service.test.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ vi.mock('../game.socket.js', () => {
106106
vi.mock('electron', async () => {
107107
return {
108108
app: {
109-
getPath: vi.fn().mockImplementation(() => 'logs'),
109+
getPath: vi.fn().mockReturnValue('logs'),
110110
},
111111
};
112112
});

electron/main/layout/__tests__/layout-instance.test.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ vi.mock('../layout.service.js', async () => {
3232
vi.mock('electron', async () => {
3333
return {
3434
app: {
35-
getPath: vi.fn().mockImplementation(() => 'userData'),
35+
getPath: vi.fn().mockReturnValue('userData'),
3636
},
3737
};
3838
});

electron/main/preference/__tests__/preference-instance.test.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ vi.mock('../../cache/disk-cache.service.js', async () => {
3232
vi.mock('electron', async () => {
3333
return {
3434
app: {
35-
getPath: vi.fn().mockImplementation(() => 'userData'),
35+
getPath: vi.fn().mockReturnValue('userData'),
3636
},
3737
};
3838
});

0 commit comments

Comments
 (0)