general code improvements

This commit is contained in:
João Geonizeli
2022-07-09 11:12:29 -03:00
parent e0dd6c2307
commit b94dd8ee9b
11 changed files with 69 additions and 35 deletions

View File

@@ -6,8 +6,12 @@ import { cleanDataSource } from "../../utils/cleanDataSource";
describe("Project", () => {
beforeAll(async () => {
await AppDataSource.initialize();
await cleanDataSource(AppDataSource, ["project", "user"]);
await cleanDataSource(AppDataSource);
});
afterAll(async () => {
await cleanDataSource(AppDataSource);
await AppDataSource.destroy()
})
describe("relations", () => {
it("should have many projects", async () => {