mirror of https://github.com/openclaw/openclaw.git
Matrix: clear undici test override after transport test
This commit is contained in:
parent
fb639fa3d5
commit
73a8dd43bf
|
|
@ -1,13 +1,21 @@
|
|||
import { beforeEach, describe, expect, it, vi } from "vitest";
|
||||
import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";
|
||||
import { MatrixMediaSizeLimitError } from "../media-errors.js";
|
||||
import { performMatrixRequest } from "./transport.js";
|
||||
|
||||
const TEST_UNDICI_RUNTIME_DEPS_KEY = "__OPENCLAW_TEST_UNDICI_RUNTIME_DEPS__";
|
||||
|
||||
function clearTestUndiciRuntimeDepsOverride(): void {
|
||||
Reflect.deleteProperty(globalThis as object, TEST_UNDICI_RUNTIME_DEPS_KEY);
|
||||
}
|
||||
|
||||
describe("performMatrixRequest", () => {
|
||||
beforeEach(() => {
|
||||
vi.unstubAllGlobals();
|
||||
Reflect.deleteProperty(globalThis as object, TEST_UNDICI_RUNTIME_DEPS_KEY);
|
||||
clearTestUndiciRuntimeDepsOverride();
|
||||
});
|
||||
|
||||
afterEach(() => {
|
||||
clearTestUndiciRuntimeDepsOverride();
|
||||
});
|
||||
|
||||
it("rejects oversized raw responses before buffering the whole body", async () => {
|
||||
|
|
|
|||
Loading…
Reference in New Issue