mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-01 07:56:13 +00:00
perf(test): trim module resets in config suites
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import fs from "node:fs/promises";
|
||||
import path from "node:path";
|
||||
import { describe, expect, it, vi } from "vitest";
|
||||
import { describe, expect, it } from "vitest";
|
||||
import { loadConfig } from "./config.js";
|
||||
import { withTempHome } from "./test-helpers.js";
|
||||
|
||||
describe("config pruning defaults", () => {
|
||||
@@ -18,8 +19,6 @@ describe("config pruning defaults", () => {
|
||||
"utf-8",
|
||||
);
|
||||
|
||||
vi.resetModules();
|
||||
const { loadConfig } = await import("./config.js");
|
||||
const cfg = loadConfig();
|
||||
|
||||
expect(cfg.agents?.defaults?.contextPruning?.mode).toBeUndefined();
|
||||
@@ -57,8 +56,6 @@ describe("config pruning defaults", () => {
|
||||
"utf-8",
|
||||
);
|
||||
|
||||
vi.resetModules();
|
||||
const { loadConfig } = await import("./config.js");
|
||||
const cfg = loadConfig();
|
||||
|
||||
expect(cfg.agents?.defaults?.contextPruning?.mode).toBe("cache-ttl");
|
||||
@@ -92,8 +89,6 @@ describe("config pruning defaults", () => {
|
||||
"utf-8",
|
||||
);
|
||||
|
||||
vi.resetModules();
|
||||
const { loadConfig } = await import("./config.js");
|
||||
const cfg = loadConfig();
|
||||
|
||||
expect(cfg.agents?.defaults?.contextPruning?.mode).toBe("cache-ttl");
|
||||
@@ -115,8 +110,6 @@ describe("config pruning defaults", () => {
|
||||
"utf-8",
|
||||
);
|
||||
|
||||
vi.resetModules();
|
||||
const { loadConfig } = await import("./config.js");
|
||||
const cfg = loadConfig();
|
||||
|
||||
expect(cfg.agents?.defaults?.contextPruning?.mode).toBe("off");
|
||||
|
||||
Reference in New Issue
Block a user