Parcourir la source

test(paas): type inbox fixtures precisely

241880436@seecoder.cn il y a 4 jours
Parent
commit
a8ddc62ed4
1 fichiers modifiés avec 12 ajouts et 1 suppressions
  1. 12 1
      packages/app/src/pages/paas/inbox.test.ts

+ 12 - 1
packages/app/src/pages/paas/inbox.test.ts

@@ -1,7 +1,18 @@
 import { expect, test } from "bun:test"
 import { buildProjectInbox } from "./inbox"
 
-const chat = (id: string, projectID: string, messages: Record<string, unknown>[]) => ({
+type TestMessage = {
+  id: string
+  role?: string
+  status?: string
+  text?: string
+  error?: string
+  runID?: string
+  updated?: number
+  started?: number
+}
+
+const chat = (id: string, projectID: string, messages: TestMessage[]) => ({
   id,
   projectID,
   agentID: "research67",