Wire up tests & sonarcloud

This commit is contained in:
Michael Telatynski
2025-01-30 10:58:23 +00:00
parent 06fcf783a1
commit 0a2f311cc8
3 changed files with 48 additions and 2 deletions
@@ -0,0 +1,24 @@
/*
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 "./api.js";
const TestModule = {
default: class TestModule {
public static moduleApiVersion = "1.0.0";
public constructor(private readonly api: Api) {}
public async load(): Promise<void> {
console.log("TestModule loaded");
}
},
};
test("isModule correctly identifies valid modules", () => {
expect(isModule(TestModule)).toBe(true);
});