test: inform devs when db connection not established (#60539)

This commit is contained in:
Oliver Eyton-Williams
2025-05-28 17:52:11 +02:00
committed by GitHub
parent 5cb96cf3e0
commit 22724d5dda
3 changed files with 19 additions and 1 deletions

View File

@@ -1,6 +1,6 @@
import Fastify, { FastifyInstance } from 'fastify';
import { defaultUserEmail } from '../../jest.utils';
import { checkCanConnectToDb, defaultUserEmail } from '../../jest.utils';
import { HOME_LOCATION } from '../utils/env';
import { devAuth } from '../plugins/auth-dev';
import prismaPlugin from '../db/prisma';
@@ -19,6 +19,7 @@ describe('dev login', () => {
await fastify.register(auth);
await fastify.register(devAuth);
await fastify.register(prismaPlugin);
await checkCanConnectToDb(fastify.prisma);
});
beforeEach(async () => {