Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions apps/desktop/electron/app-icon-path.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,12 @@ test('APP_ICON_PATHS prefers the asar.unpacked copy over in-asar paths', () => {

const entries = block[1]
.split('\n')
.map((line) => line.trim())
.filter((line) => line.startsWith('path.join('))
.map(line => line.trim())
.filter(line => line.startsWith('path.join('))

assert.ok(entries.length > 0, 'APP_ICON_PATHS has no path.join() candidates')

const unpackedIndex = entries.findIndex((entry) => entry.includes('unpackedPathFor('))
const unpackedIndex = entries.findIndex(entry => entry.includes('unpackedPathFor('))
assert.notEqual(
unpackedIndex,
-1,
Expand Down Expand Up @@ -94,10 +94,11 @@ test('dist/ is unpacked from the asar so the icon candidate exists on disk', ()
const pkg = JSON.parse(fs.readFileSync(DESKTOP_PKG, 'utf-8')) as {
build?: { asarUnpack?: string[] }
}

const asarUnpack = pkg.build?.asarUnpack ?? []

assert.ok(
asarUnpack.some((pattern) => pattern.startsWith('dist/')),
asarUnpack.some(pattern => pattern.startsWith('dist/')),
'build.asarUnpack must unpack dist/** — the APP_ICON_PATHS unpacked ' +
'candidate resolves to <app.asar.unpacked>/dist/apple-touch-icon.png, ' +
`which only exists if dist is unpacked. Got: ${JSON.stringify(asarUnpack)}`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,7 @@ describe('useSessionChanges B1', () => {
if (call[0] !== 'session.changes') {
continue
}

expect((call[1] as { session_id: string }).session_id).toBe(STORED_SID)
expect((call[1] as { session_id: string }).session_id).not.toBe(SID)
}
Expand Down
Loading