mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-08 01:51:24 +00:00
perf(test): reduce module reload overhead in key suites
This commit is contained in:
@@ -2,14 +2,12 @@ import fs from "node:fs/promises";
|
||||
import path from "node:path";
|
||||
import { describe, expect, it, vi } from "vitest";
|
||||
import { withTempHome } from "../../test/helpers/temp-home.js";
|
||||
import { resolveProviderAuths } from "./provider-usage.auth.js";
|
||||
|
||||
describe("resolveProviderAuths key normalization", () => {
|
||||
it("strips embedded CR/LF from env keys", async () => {
|
||||
await withTempHome(
|
||||
async () => {
|
||||
vi.resetModules();
|
||||
const { resolveProviderAuths } = await import("./provider-usage.auth.js");
|
||||
|
||||
const auths = await resolveProviderAuths({
|
||||
providers: ["zai", "minimax", "xiaomi"],
|
||||
});
|
||||
@@ -50,9 +48,6 @@ describe("resolveProviderAuths key normalization", () => {
|
||||
"utf8",
|
||||
);
|
||||
|
||||
vi.resetModules();
|
||||
const { resolveProviderAuths } = await import("./provider-usage.auth.js");
|
||||
|
||||
const auths = await resolveProviderAuths({
|
||||
providers: ["minimax", "xiaomi"],
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user