mirror of
https://github.com/openclaw/openclaw.git
synced 2026-07-10 00:11:19 +00:00
* test: speed up isolated test suite * test: finish isolated latency cleanup * test: eliminate remaining isolated latency spikes * test: remove final isolated timing outliers * test: bound full-suite tooling processes * test: bound native test process lifetime * test: warm isolated runtime suites * test: eliminate final isolated timing outliers * test: fix isolated timing fixture types * test: make timeout cleanup timing deterministic * test: pin media manifests to source checkout * test: isolate provider manifest contracts * test: eliminate residual isolated timing spikes * test: restore final isolated timing fixes * test: eliminate remaining isolated timing spikes * test: warm Zalo lifecycle imports * test: keep isolated suites below one second * test: use readable browser response fixtures
26 lines
1 KiB
TypeScript
26 lines
1 KiB
TypeScript
// Discord tests cover setup entry plugin behavior.
|
|
import { describe, expect, it } from "vitest";
|
|
import setupEntry from "./setup-entry.js";
|
|
|
|
type LegacyStateMigrationsApi = typeof import("./legacy-state-migrations-api.js");
|
|
|
|
const migrationDetector =
|
|
(() => []) satisfies LegacyStateMigrationsApi["detectDiscordLegacyStateMigrations"];
|
|
const setupEntryLoadOptions = {
|
|
createLoaderForTest: (() => (specifier: string) => {
|
|
expect(specifier).toMatch(/[\\/]legacy-state-migrations-api\.[jt]s$/u);
|
|
return {
|
|
detectDiscordLegacyStateMigrations: migrationDetector,
|
|
} satisfies Pick<LegacyStateMigrationsApi, "detectDiscordLegacyStateMigrations">;
|
|
}) as never,
|
|
};
|
|
|
|
describe("discord setup entry", () => {
|
|
it("resolves the legacy state migration detector through the setup entry", () => {
|
|
expect(setupEntry.kind).toBe("bundled-channel-setup-entry");
|
|
expect(setupEntry.features).toEqual({ legacyStateMigrations: true });
|
|
expect(setupEntry.loadLegacyStateMigrationDetector?.(setupEntryLoadOptions)).toBe(
|
|
migrationDetector,
|
|
);
|
|
});
|
|
});
|