mirror of
https://github.com/openclaw/openclaw.git
synced 2026-04-03 21:31:26 +00:00
refactor(plugins): decouple bundled plugin runtime loading
This commit is contained in:
@@ -1,8 +1,11 @@
|
||||
import { Command } from "commander";
|
||||
import { afterAll, afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest";
|
||||
import { repoInstallSpec } from "../../../test/helpers/bundled-plugin-paths.js";
|
||||
import { loggingState } from "../../logging/state.js";
|
||||
import { setCommandJsonMode } from "./json-mode.js";
|
||||
|
||||
const MATRIX_REPO_INSTALL_SPEC = repoInstallSpec("matrix");
|
||||
|
||||
const setVerboseMock = vi.fn();
|
||||
const emitCliBannerMock = vi.fn();
|
||||
const ensureConfigReadyMock = vi.fn(async () => {});
|
||||
@@ -286,8 +289,8 @@ describe("registerPreActionHooks", () => {
|
||||
|
||||
vi.clearAllMocks();
|
||||
await runPreAction({
|
||||
parseArgv: ["plugins", "install", "./extensions/matrix"],
|
||||
processArgv: ["node", "openclaw", "plugins", "install", "./extensions/matrix"],
|
||||
parseArgv: ["plugins", "install", MATRIX_REPO_INSTALL_SPEC],
|
||||
processArgv: ["node", "openclaw", "plugins", "install", MATRIX_REPO_INSTALL_SPEC],
|
||||
});
|
||||
|
||||
expect(ensureConfigReadyMock).toHaveBeenCalledWith({
|
||||
|
||||
Reference in New Issue
Block a user