mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-28 08:12:12 +00:00
fix(release): stabilize plugin prerelease tests
This commit is contained in:
@@ -151,8 +151,11 @@ describe("memory watcher config", () => {
|
||||
let manager: MemoryIndexManager | null = null;
|
||||
let workspaceDir = "";
|
||||
let extraDir = "";
|
||||
let originalPlatform: NodeJS.Platform;
|
||||
|
||||
beforeEach(async () => {
|
||||
originalPlatform = process.platform;
|
||||
Object.defineProperty(process, "platform", { value: "darwin", configurable: true });
|
||||
vi.clearAllMocks();
|
||||
clearRegistry();
|
||||
registerBuiltInMemoryEmbeddingProviders({ registerMemoryEmbeddingProvider: registerAdapter });
|
||||
@@ -166,6 +169,7 @@ describe("memory watcher config", () => {
|
||||
|
||||
afterEach(async () => {
|
||||
vi.useRealTimers();
|
||||
Object.defineProperty(process, "platform", { value: originalPlatform, configurable: true });
|
||||
watchMock.mockClear();
|
||||
nativeWatchMock.mockClear();
|
||||
createdChokidarWatchers.length = 0;
|
||||
|
||||
@@ -162,7 +162,7 @@ export function resolveWhatsAppMediaMaxBytes(
|
||||
typeof account.mediaMaxMb === "number" && account.mediaMaxMb > 0
|
||||
? account.mediaMaxMb
|
||||
: DEFAULT_WHATSAPP_MEDIA_MAX_MB;
|
||||
return mediaMaxMb * 1024 * 1024;
|
||||
return Math.floor(mediaMaxMb * 1024 * 1024);
|
||||
}
|
||||
|
||||
export function listEnabledWhatsAppAccounts(cfg: OpenClawConfig): ResolvedWhatsAppAccount[] {
|
||||
|
||||
Reference in New Issue
Block a user