railyard/apps/ritgram/backend/tests/e2e/globalTeardown.ts
caelum0x f80b04ae0f feat(ritgram): move GitGram app into railyard as Ritgram, next to Rithub
Moved later/gitgram-ai/gitgram/ to apps/ritgram/ (fresh history; full history stays in caelum0x/gitgram).
AITimeMachine stays separate in later/gitgram-ai per the Rithub master plan.
Logs, pid files and env files are ignored; GPL-3.0 mobile/proximity noted in THIRD_PARTY_NOTICES.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-11-13 04:18:46 +03:00

18 lines
625 B
TypeScript

/**
* E2E global teardown.
*
* Disconnects the shared Prisma client so the Jest process can exit cleanly.
* The database itself is ephemeral (tmpfs / CI service container) and is
* discarded when the harness is torn down, so no data cleanup is required here.
*/
export default async function globalTeardown(): Promise<void> {
try {
// Lazy require so this file has no import-time side effects.
const { PrismaClient } = require('@prisma/client');
const prisma = new PrismaClient();
await prisma.$disconnect();
} catch {
// Best-effort — nothing to clean up if the client never connected.
}
}