mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 19:31:00 +00:00
test: trim duplicate runtime smoke work
This commit is contained in:
@@ -2,19 +2,18 @@ import { describe, expect, it } from "vitest";
|
||||
import { runDirectImportSmoke } from "../../test/helpers/plugins/direct-smoke.js";
|
||||
|
||||
describe("irc bundled api seams", () => {
|
||||
it("loads the narrow channel plugin api in direct smoke", async () => {
|
||||
it("loads narrow public api modules in direct smoke", async () => {
|
||||
const stdout = await runDirectImportSmoke(
|
||||
'const mod = await import("./extensions/irc/channel-plugin-api.ts"); process.stdout.write(JSON.stringify({keys:Object.keys(mod).sort(), id: mod.ircPlugin.id}));',
|
||||
`const channel = await import("./extensions/irc/channel-plugin-api.ts");
|
||||
const runtime = await import("./extensions/irc/runtime-api.ts");
|
||||
process.stdout.write(JSON.stringify({
|
||||
channel: { keys: Object.keys(channel).sort(), id: channel.ircPlugin.id },
|
||||
runtime: { keys: Object.keys(runtime).sort(), type: typeof runtime.setIrcRuntime },
|
||||
}));`,
|
||||
);
|
||||
|
||||
expect(stdout).toBe('{"keys":["ircPlugin"],"id":"irc"}');
|
||||
}, 45_000);
|
||||
|
||||
it("loads the narrow runtime api in direct smoke", async () => {
|
||||
const stdout = await runDirectImportSmoke(
|
||||
'const mod = await import("./extensions/irc/runtime-api.ts"); process.stdout.write(JSON.stringify({keys:Object.keys(mod).sort(), type: typeof mod.setIrcRuntime}));',
|
||||
expect(stdout).toBe(
|
||||
'{"channel":{"keys":["ircPlugin"],"id":"irc"},"runtime":{"keys":["setIrcRuntime"],"type":"function"}}',
|
||||
);
|
||||
|
||||
expect(stdout).toBe('{"keys":["setIrcRuntime"],"type":"function"}');
|
||||
}, 45_000);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user