From 80375db934a20e119efb419f566a627523b236be Mon Sep 17 00:00:00 2001 From: Tulir Asokan Date: Wed, 3 Sep 2025 15:55:54 +0200 Subject: [PATCH] Fix m.topic tests (#30663) For https://github.com/matrix-org/matrix-js-sdk/pull/4984 Signed-off-by: Tulir Asokan --- test/unit-tests/TextForEvent-test.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/unit-tests/TextForEvent-test.ts b/test/unit-tests/TextForEvent-test.ts index 4799b0fd5d..73fc809856 100644 --- a/test/unit-tests/TextForEvent-test.ts +++ b/test/unit-tests/TextForEvent-test.ts @@ -664,24 +664,24 @@ describe("TextForEvent", () => { ["the legacy key", { topic: "My topic" }, { result: '@a changed the topic to "My topic".' }], [ "the legacy key with an empty m.topic key", - { "topic": "My topic", "m.topic": [] }, + { "topic": "My topic", "m.topic": { "m.text": [] } }, { result: '@a changed the topic to "My topic".' }, ], [ "the m.topic key", - { "topic": "Ignore this", "m.topic": [{ mimetype: "text/plain", body: "My topic" }] }, + { "topic": "Ignore this", "m.topic": { "m.text": [{ mimetype: "text/plain", body: "My topic" }] } }, { result: '@a changed the topic to "My topic".' }, ], [ "the m.topic key and the legacy key undefined", - { "topic": undefined, "m.topic": [{ mimetype: "text/plain", body: "My topic" }] }, + { "topic": undefined, "m.topic": { "m.text": [{ mimetype: "text/plain", body: "My topic" }] } }, { result: '@a changed the topic to "My topic".' }, ], ["the legacy key undefined", { topic: undefined }, { result: "@a removed the topic." }], ["the legacy key empty string", { topic: "" }, { result: "@a removed the topic." }], [ "both the legacy and new keys removed", - { "topic": undefined, "m.topic": [] }, + { "topic": undefined, "m.topic": { "m.text": [] } }, { result: "@a removed the topic." }, ], ];