Add test for builtinsapi

This commit is contained in:
David Baker 2025-10-17 17:05:45 +01:00
parent 206905c2f5
commit a5f3876a38

View File

@ -0,0 +1,17 @@
/*
Copyright 2025 New Vector Ltd.
SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only OR LicenseRef-Element-Commercial
Please see LICENSE files in the repository root for full details.
*/
import { ElementWebBuiltinsApi } from "../../../src/modules/BuiltinsApi";
describe("ElementWebBuiltinsApi", () => {
it("returns the RoomView component thats been set", () => {
const builtinsApi = new ElementWebBuiltinsApi();
const sentinel = {};
builtinsApi.setRoomViewComponent(sentinel as any);
expect(builtinsApi.getRoomViewComponent()).toBe(sentinel);
});
});