Skip to content

Commit

Permalink
feat: add closeTestDatabase function to createUnitTest script
Browse files Browse the repository at this point in the history
  • Loading branch information
typeWolffo committed Aug 9, 2024
1 parent 9d9a4fd commit 27a5ec2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion apps/api/test/create-unit-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { Test, TestingModule } from "@nestjs/testing";
import { StartedTestContainer } from "testcontainers";
import { AppModule } from "../src/app.module";
import { DatabasePg } from "../src/common";
import { setupTestDatabase } from "./test-database";
import { closeTestDatabase, setupTestDatabase } from "./test-database";
import { EmailAdapter } from "src/common/emails/adapters/email.adapter";
import { EmailTestingAdapter } from "./helpers/test-email.adapter";

Expand Down Expand Up @@ -34,6 +34,7 @@ export async function createUnitTest(
await container.stop();
}
await module.close();
await closeTestDatabase();
};

return {
Expand Down

0 comments on commit 27a5ec2

Please sign in to comment.