refactor(test): improve build error message (#53946)

This commit is contained in:
Oliver Eyton-Williams
2024-03-01 13:09:23 +01:00
committed by GitHub
parent 84e5f82d3c
commit c77a1c622f
+3
View File
@@ -118,6 +118,9 @@ export function setupServer(): void {
}, 10000);
afterAll(async () => {
if (!global.fastifyTestInstance)
throw Error(`fastifyTestInstance was not created. Typically this means that something went wrong when building the fastify instance.
If you are seeing this error, the root cause is likely an error thrown in the beforeAll hook.`);
await fastifyTestInstance.prisma.$runCommandRaw({ dropDatabase: 1 });
// Due to a prisma bug, this is not enough, we need to --force-exit jest: