Sign panel sessions and isolate test runs
Some checks failed
Deploy to Production / test (push) Failing after 29s
Some checks failed
Deploy to Production / test (push) Failing after 29s
- Replace in-memory auth sessions with signed cookies and signed OAuth state - Add auth route coverage and update panel/web server wiring - Switch test script to per-file Bun processes and clean up type checks
This commit is contained in:
@@ -69,9 +69,11 @@ mock.module("@shared/lib/config", () => ({
|
||||
|
||||
// Mock Events (trivia service emits domain events instead of calling dashboardService directly)
|
||||
const mockEmit = mock(() => true);
|
||||
const mockEmitAsync = mock(async () => true);
|
||||
mock.module("@shared/lib/events", () => ({
|
||||
systemEvents: {
|
||||
emit: mockEmit,
|
||||
emitAsync: mockEmitAsync,
|
||||
},
|
||||
EVENTS: {
|
||||
DOMAIN: {
|
||||
@@ -115,6 +117,7 @@ describe("TriviaService", () => {
|
||||
mockWhere.mockClear();
|
||||
mockOnConflictDoUpdate.mockClear();
|
||||
mockEmit.mockClear();
|
||||
mockEmitAsync.mockClear();
|
||||
// Clear active sessions
|
||||
(triviaService as any).activeSessions.clear();
|
||||
});
|
||||
@@ -224,7 +227,7 @@ describe("TriviaService", () => {
|
||||
// Verify balance update
|
||||
expect(mockUpdate).toHaveBeenCalledWith(users);
|
||||
expect(mockInsert).toHaveBeenCalledWith(transactions);
|
||||
expect(mockEmit).toHaveBeenCalled();
|
||||
expect(mockEmitAsync).toHaveBeenCalled();
|
||||
});
|
||||
|
||||
it("should not award prize for incorrect answer", async () => {
|
||||
|
||||
Reference in New Issue
Block a user