mirror of
https://github.com/moltbot/moltbot.git
synced 2026-04-20 21:23:23 +00:00
Tests: cover Matrix runtime wrapper and idHint compatibility
This commit is contained in:
22
extensions/matrix/src/plugin-entry.runtime.test.ts
Normal file
22
extensions/matrix/src/plugin-entry.runtime.test.ts
Normal file
@@ -0,0 +1,22 @@
|
||||
import path from "node:path";
|
||||
import { pathToFileURL } from "node:url";
|
||||
import { expect, it } from "vitest";
|
||||
|
||||
it("loads the plugin-entry runtime wrapper through native ESM import", async () => {
|
||||
const wrapperPath = path.join(
|
||||
process.cwd(),
|
||||
"extensions",
|
||||
"matrix",
|
||||
"src",
|
||||
"plugin-entry.runtime.js",
|
||||
);
|
||||
const wrapperUrl = pathToFileURL(wrapperPath);
|
||||
const mod = await import(wrapperUrl.href);
|
||||
|
||||
expect(mod).toMatchObject({
|
||||
ensureMatrixCryptoRuntime: expect.any(Function),
|
||||
handleVerifyRecoveryKey: expect.any(Function),
|
||||
handleVerificationBootstrap: expect.any(Function),
|
||||
handleVerificationStatus: expect.any(Function),
|
||||
});
|
||||
}, 240_000);
|
||||
@@ -638,6 +638,7 @@ describe("loadPluginManifestRegistry", () => {
|
||||
{ name: "provider-style", manifestId: "openai", idHint: "openai-provider" },
|
||||
{ name: "plugin-style", manifestId: "brave", idHint: "brave-plugin" },
|
||||
{ name: "sandbox-style", manifestId: "openshell", idHint: "openshell-sandbox" },
|
||||
{ name: "multi-entry-style", manifestId: "matrix", idHint: "matrix/index" },
|
||||
{
|
||||
name: "media-understanding-style",
|
||||
manifestId: "groq",
|
||||
|
||||
Reference in New Issue
Block a user