mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-05-28 18:26:54 +00:00
refactor(test): improve build error message (#53946)
This commit is contained in:
committed by
GitHub
parent
84e5f82d3c
commit
c77a1c622f
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user