mirror of
https://github.com/diegosouzapw/OmniRoute.git
synced 2026-08-21 22:52:19 +03:00
test(chatcore): wait for queued call log writes (#10683)
Merged — locally validated (70/70 combined chatcore-translation-paths tests, typecheck:core clean, gates green). Thanks!
This commit is contained in:
@@ -36,7 +36,8 @@ const {
|
||||
setBackgroundDegradationConfig,
|
||||
resetStats: resetBackgroundStats,
|
||||
} = await import("../../open-sse/services/backgroundTaskDetector.ts");
|
||||
const { getCallLogs, getCallLogById } = await import("../../src/lib/usage/callLogs.ts");
|
||||
const { getCallLogs, getCallLogById, waitForCallLogSaves } =
|
||||
await import("../../src/lib/usage/callLogs.ts");
|
||||
const {
|
||||
handleChatCore,
|
||||
shouldUseNativeCodexPassthrough,
|
||||
@@ -286,6 +287,7 @@ async function flushAsyncSideEffects() {
|
||||
}
|
||||
|
||||
async function getLatestCallLog() {
|
||||
await waitForCallLogSaves(5000);
|
||||
const rows = await getCallLogs({ limit: 5 });
|
||||
if (!Array.isArray(rows) || rows.length === 0) return null;
|
||||
return getCallLogById(rows[0].id);
|
||||
|
||||
Reference in New Issue
Block a user