refactor(core): simplify session fork event
This commit is contained in:
parent
b2d46ecd7e
commit
ff4cab03c1
5 changed files with 40 additions and 52 deletions
|
|
@ -166,7 +166,7 @@ describe("SessionV2.create", () => {
|
|||
expect(history.events[0]).toMatchObject({
|
||||
type: "session.next.forked",
|
||||
durable: { seq: 0 },
|
||||
data: { sessionID: forked.id, parentID: parent.id, copiedSeq: 3 },
|
||||
data: { sessionID: forked.id, parentID: parent.id },
|
||||
})
|
||||
expect(yield* SessionInput.find(db, forkContext[0]!.id)).toMatchObject({
|
||||
sessionID: forked.id,
|
||||
|
|
@ -216,7 +216,7 @@ describe("SessionV2.create", () => {
|
|||
const history = yield* session.history({ sessionID: forked.id, limit: 10 })
|
||||
expect(context).toMatchObject([{ text: "First" }])
|
||||
expect(context[0]?.id).not.toBe(first.id)
|
||||
expect(history.events[0]).toMatchObject({ data: { copiedSeq: 2, messageID: second.id } })
|
||||
expect(history.events[0]).toMatchObject({ data: { messageID: second.id } })
|
||||
}),
|
||||
)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue