Clean mailhog between tests

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
Michael Telatynski
2025-01-10 11:48:37 +00:00
parent c25c8a3b9a
commit db47e68903

View File

@@ -131,11 +131,12 @@ export const test = base.extend<{}, Services>({
{ scope: "worker" },
],
context: async ({ logger, context, request, homeserver }, use, testInfo) => {
context: async ({ logger, context, request, homeserver, mailhogClient }, use, testInfo) => {
homeserver.setRequest(request);
await logger.testStarted(testInfo);
await use(context);
await logger.testFinished(testInfo);
await homeserver.onTestFinished(testInfo);
await mailhogClient.deleteAll();
},
});