mirror of
https://github.com/openclaw/openclaw.git
synced 2026-04-25 03:04:29 -04:00
test: dedupe and optimize test suites
This commit is contained in:
@@ -2,6 +2,7 @@ import fs from "node:fs/promises";
|
||||
import os from "node:os";
|
||||
import path from "node:path";
|
||||
import { afterAll, beforeAll, beforeEach, describe, expect, it, vi } from "vitest";
|
||||
import { compactEmbeddedPiSession } from "../../agents/pi-embedded.js";
|
||||
import {
|
||||
addSubagentRunForTests,
|
||||
listSubagentRunsForRequester,
|
||||
@@ -294,7 +295,6 @@ describe("/compact command", () => {
|
||||
});
|
||||
|
||||
it("returns null when command is not /compact", async () => {
|
||||
const { compactEmbeddedPiSession } = await import("../../agents/pi-embedded.js");
|
||||
const cfg = {
|
||||
commands: { text: true },
|
||||
channels: { whatsapp: { allowFrom: ["*"] } },
|
||||
@@ -313,7 +313,6 @@ describe("/compact command", () => {
|
||||
});
|
||||
|
||||
it("rejects unauthorized /compact commands", async () => {
|
||||
const { compactEmbeddedPiSession } = await import("../../agents/pi-embedded.js");
|
||||
const cfg = {
|
||||
commands: { text: true },
|
||||
channels: { whatsapp: { allowFrom: ["*"] } },
|
||||
@@ -337,7 +336,6 @@ describe("/compact command", () => {
|
||||
});
|
||||
|
||||
it("routes manual compaction with explicit trigger and context metadata", async () => {
|
||||
const { compactEmbeddedPiSession } = await import("../../agents/pi-embedded.js");
|
||||
const cfg = {
|
||||
commands: { text: true },
|
||||
channels: { whatsapp: { allowFrom: ["*"] } },
|
||||
|
||||
Reference in New Issue
Block a user