Skip to content

Commit eafea20

Browse files
committed
fix: tests
1 parent e337a3c commit eafea20

File tree

3 files changed

+8
-4
lines changed

3 files changed

+8
-4
lines changed

src/backend/logger/__tests__/logfile.test.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,8 @@ describe('logger/logfile.ts', () => {
7070
currentLogFile: 'old/log/path/file.log',
7171
lastLogFile: '',
7272
legendaryLogFile: '',
73-
gogdlLogFile: ''
73+
gogdlLogFile: '',
74+
steamLogFile: ''
7475
})
7576

7677
jest.spyOn(app, 'requestSingleInstanceLock').mockImplementation(() => true)
@@ -81,7 +82,8 @@ describe('logger/logfile.ts', () => {
8182
currentLogFile: expect.any(String),
8283
lastLogFile: expect.any(String),
8384
legendaryLogFile: expect.any(String),
84-
gogdlLogFile: expect.any(String)
85+
gogdlLogFile: expect.any(String),
86+
steamLogFile: expect.any(String)
8587
})
8688
})
8789

src/backend/shortcuts/nonesteamgame/nonesteamgame.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ async function addNonSteamGame(props: {
217217
bkgDataUrl?: string
218218
bigPicDataUrl?: string
219219
}): Promise<boolean> {
220-
if (props.gameInfo.install.is_dlc || props.gameInfo.runner === 'steam') {
220+
if (props.gameInfo?.install?.is_dlc || props.gameInfo.runner === 'steam') {
221221
return false
222222
}
223223

src/frontend/state/__tests__/libraryState.test.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,9 @@ Object.defineProperty(window, 'api', {
66
install: jest.fn(),
77
storeNew: jest.fn(),
88
storeGet: jest.fn(),
9-
storeSet: jest.fn()
9+
storeSet: jest.fn(),
10+
storeHas: jest.fn().mockReturnValue(false),
11+
storeDelete: jest.fn()
1012
}
1113
})
1214

0 commit comments

Comments
 (0)