chore: Test performance (#5786)
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
import { buildUser, buildWebhookSubscription } from "@server/test/factories";
|
||||
import { setupTestDatabase } from "@server/test/support";
|
||||
import { UserEvent } from "@server/types";
|
||||
import DeliverWebhookTask from "../tasks/DeliverWebhookTask";
|
||||
import WebhookProcessor from "./WebhookProcessor";
|
||||
@@ -7,8 +6,6 @@ import WebhookProcessor from "./WebhookProcessor";
|
||||
jest.mock("../tasks/DeliverWebhookTask");
|
||||
const ip = "127.0.0.1";
|
||||
|
||||
setupTestDatabase();
|
||||
|
||||
beforeEach(async () => {
|
||||
jest.resetAllMocks();
|
||||
});
|
||||
|
||||
@@ -1,11 +1,8 @@
|
||||
import { subDays } from "date-fns";
|
||||
import { WebhookDelivery } from "@server/models";
|
||||
import { buildWebhookDelivery } from "@server/test/factories";
|
||||
import { setupTestDatabase } from "@server/test/support";
|
||||
import CleanupWebhookDeliveriesTask from "./CleanupWebhookDeliveriesTask";
|
||||
|
||||
setupTestDatabase();
|
||||
|
||||
const deliveryExists = async (delivery: WebhookDelivery) => {
|
||||
const results = await WebhookDelivery.findOne({ where: { id: delivery.id } });
|
||||
return !!results;
|
||||
|
||||
@@ -6,12 +6,9 @@ import {
|
||||
buildWebhookDelivery,
|
||||
buildWebhookSubscription,
|
||||
} from "@server/test/factories";
|
||||
import { setupTestDatabase } from "@server/test/support";
|
||||
import { UserEvent } from "@server/types";
|
||||
import DeliverWebhookTask from "./DeliverWebhookTask";
|
||||
|
||||
setupTestDatabase();
|
||||
|
||||
beforeEach(async () => {
|
||||
jest.resetAllMocks();
|
||||
fetchMock.resetMocks();
|
||||
|
||||
Reference in New Issue
Block a user