Files
blap/packages/element-web-module-api/src/api/index.test.ts
T
Michael Telatynski d7736db1af Initial stable release of the Module API
Primarily to get away from semver treating every update as breaking in the 0.x.y series.
2025-05-13 10:40:26 +01:00

23 lines
579 B
TypeScript

/*
Copyright 2025 New Vector Ltd.
SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial
Please see LICENSE files in the repository root for full details.
*/
import { expect, test } from "vitest";
import { Api, isModule } from ".";
const TestModule = {
default: class TestModule {
public static moduleApiVersion = "1.0.0";
public constructor(private readonly api: Api) {}
public async load(): Promise<void> {}
},
};
test("isModule correctly identifies valid modules", () => {
expect(isModule(TestModule)).toBe(true);
});