From edb38a8ad275743f29c94689d94c112843748c71 Mon Sep 17 00:00:00 2001 From: Andy Balaam Date: Thu, 30 Mar 2023 14:27:52 +0100 Subject: [PATCH] Test for MatrixToPermalinkConstructor.forRoom --- .../utils/permalinks/MatrixToPermalinkConstructor-test.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/test/utils/permalinks/MatrixToPermalinkConstructor-test.ts b/test/utils/permalinks/MatrixToPermalinkConstructor-test.ts index e8750114136..7a4fa5a60b7 100644 --- a/test/utils/permalinks/MatrixToPermalinkConstructor-test.ts +++ b/test/utils/permalinks/MatrixToPermalinkConstructor-test.ts @@ -41,4 +41,12 @@ describe("MatrixToPermalinkConstructor", () => { ); }); }); + + describe("forRoom", () => { + it("constructs a link given a room ID and via servers", () => { + expect(peramlinkConstructor.forRoom("!myroom:example.com", ["one.example.com", "two.example.com"])).toEqual( + "https://matrix.to/#/!myroom:example.com?via=one.example.com&via=two.example.com", + ); + }); + }); });