Skip to content
Open
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: 8 additions & 1 deletion src/__tests__/accounts.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,14 @@ mock.module('../plugin/storage/sqlite.js', () => ({
getAccounts: () => [],
upsertAccount: () => Promise.resolve(),
deleteAccount: () => Promise.resolve(),
batchUpsertAccounts: () => Promise.resolve()
batchUpsertAccounts: () => Promise.resolve(),
// mock.module() registers globally for the whole bun test run, not just
// this file, so this stub must cover every kiroDb method any other test
// file's code path might hit — otherwise a different test file silently
// fails depending on run order (see #tool-compatibility.test.ts).
getConversationId: () => undefined,
setConversationId: () => {},
deleteConversationId: () => {}
}
}))
mock.module('../plugin/sync/kiro-cli.js', () => ({
Expand Down
4 changes: 4 additions & 0 deletions src/__tests__/bearer-retry.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,10 @@ function createHarness() {
const accountManager: any = {
getAccounts: () => [account],
getAccountCount: () => 1,
markUnhealthy: (acc: any, reason: string) => {
acc.isHealthy = false
acc.unhealthyReason = reason
},
toAuthDetails: (selected: any) => ({
access: selected.accessToken,
refresh: selected.refreshToken,
Expand Down
Loading