perf(test): trim more matrix and telegram reload churn

This commit is contained in:
Vincent Koc
2026-04-01 22:28:18 +09:00
parent dd5bf6b1d0
commit e1b6c9b29b
3 changed files with 12 additions and 9 deletions

View File

@@ -1,4 +1,4 @@
import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";
import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest";
import {
createMockMatrixClient,
expectExplicitMatrixClientConfig,
@@ -38,10 +38,12 @@ let withResolvedMatrixControlClient: typeof import("./client.js").withResolvedMa
let withResolvedMatrixSendClient: typeof import("./client.js").withResolvedMatrixSendClient;
describe("matrix send client helpers", () => {
beforeEach(async () => {
vi.resetModules();
beforeAll(async () => {
({ withResolvedMatrixControlClient, withResolvedMatrixSendClient } =
await import("./client.js"));
});
beforeEach(() => {
primeMatrixClientResolverMocks({
resolved: {},
});