perf(test): trim module resets in config suites

This commit is contained in:
Peter Steinberger
2026-02-13 15:04:43 +00:00
parent a5faea614b
commit 79f4c4c584
10 changed files with 23 additions and 154 deletions

View File

@@ -1,13 +1,11 @@
import path from "node:path";
import { describe, expect, it, vi } from "vitest";
import { describe, expect, it } from "vitest";
import { withTempHome } from "../../test/helpers/temp-home.js";
import { normalizeConfigPaths } from "./normalize-paths.js";
describe("normalizeConfigPaths", () => {
it("expands tilde for path-ish keys only", async () => {
await withTempHome(async (home) => {
vi.resetModules();
const { normalizeConfigPaths } = await import("./normalize-paths.js");
const cfg = normalizeConfigPaths({
tools: { exec: { pathPrepend: ["~/bin"] } },
plugins: { load: { paths: ["~/plugins/a"] } },