Files
openclaw/src/plugins/source-checkout-runtime.test.ts
Peter Steinberger 98e3f729bc refactor: remove dead plugin loader exports (#105937)
* refactor(plugins): trim activation and contract exports

* test(plugins): restore fixture cleanup

* refactor(plugins): trim install and loader exports

* test(plugins): fully reset loader caches

* refactor(plugins): trim metadata and catalog exports

* test(plugins): preserve catalog trust coverage

* refactor(plugins): trim provider and plugin exports

* refactor(plugins): trim runtime and tool exports

* test(plugins): update dead-export consumers

* test(plugins): remove empty dead-export suites

* refactor(plugins): align exports with split registry

* refactor(plugins): trim drifted loader exports

* style(plugins): format test fixtures

* refactor(scripts): use supported plugin APIs

* refactor(plugins): finish dead export cleanup

* chore(deadcode): refresh export baseline

* test(cli): mock production memory state

* chore(deadcode): sync latest export baseline

* fix(tests): keep plugin fixtures inside core

* chore(deadcode): refresh rebased export baseline

* chore(deadcode): sync current ratchets

* fix(plugins): retain reserved slot invariant

* fix(plugins): preserve dead-export invariants

* test(plugins): use neutral catalog query fixture

* test(plugins): satisfy catalog lint

* test(plugins): preserve integrity drift coverage

* fix(ci): register skill experience live proof
2026-07-13 01:29:33 -07:00

31 lines
1.0 KiB
TypeScript

/** Verifies source-checkout plugin runtime resolution and dependency diagnostics. */
import path from "node:path";
import { describe, expect, it } from "vitest";
import { loadOpenClawPlugins } from "./loader.js";
describe("source checkout bundled plugin runtime", () => {
it("loads enabled bundled plugins from source checkout", () => {
const registry = loadOpenClawPlugins({
cache: false,
onlyPluginIds: ["tokenjuice"],
config: {
plugins: {
entries: {
tokenjuice: { enabled: true },
},
},
},
});
const tokenjuice = registry.plugins.find((plugin) => plugin.id === "tokenjuice");
expect(tokenjuice?.status).toBe("loaded");
expect(tokenjuice?.origin).toBe("bundled");
const expectedRuntime = `${path.sep}extensions${path.sep}tokenjuice${path.sep}index.ts`;
const expectedRoot = `${path.sep}extensions${path.sep}tokenjuice`;
expect(tokenjuice?.source).toContain(expectedRuntime);
expect(tokenjuice?.rootDir).toContain(expectedRoot);
});
});