refactor(app): centralize session state (#33641)
This commit is contained in:
parent
56a37c3640
commit
3b4aaafd41
27 changed files with 865 additions and 1149 deletions
|
|
@ -36,4 +36,13 @@ describe("session routes", () => {
|
|||
}),
|
||||
).toBe(sessions.root)
|
||||
})
|
||||
|
||||
test("rejects a parent cycle", async () => {
|
||||
const sessions: Record<string, { id: string; parentID?: string }> = {
|
||||
child: { id: "child", parentID: "parent" },
|
||||
parent: { id: "parent", parentID: "child" },
|
||||
}
|
||||
|
||||
expect(rootSession(sessions.child, async (id) => sessions[id]!)).rejects.toThrow("Session parent cycle: child")
|
||||
})
|
||||
})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue