chore: Reduce test boilerplate (#4300)
* chore: Reduce test boilerplate * mo
This commit is contained in:
@@ -6,15 +6,12 @@ import {
|
||||
buildUser,
|
||||
buildShare,
|
||||
} from "@server/test/factories";
|
||||
import { getTestDatabase, seed } from "@server/test/support";
|
||||
import { setupTestDatabase, seed } from "@server/test/support";
|
||||
import slugify from "@server/utils/slugify";
|
||||
|
||||
const db = getTestDatabase();
|
||||
setupTestDatabase();
|
||||
|
||||
afterAll(db.disconnect);
|
||||
|
||||
beforeEach(async () => {
|
||||
await db.flush();
|
||||
beforeEach(() => {
|
||||
jest.resetAllMocks();
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user