Skip to content

Commit

Permalink
Add tests for other branches.
Browse files Browse the repository at this point in the history
  • Loading branch information
Half-Shot committed Feb 3, 2025
1 parent 0e5e256 commit a0f7a63
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions spec/unit/content-helpers.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -268,5 +268,26 @@ describe("Topic content helpers", () => {
html: "<b>pizza</b>",
});
});

it("parses legacy event content", () => {
expect(
parseTopicContent({
topic: "pizza",
}),
).toEqual({
text: "pizza",
});
});

it("uses legacy event content when new topic key is invalid", () => {
expect(
parseTopicContent({
"topic": "pizza",
"m.topic": {} as any,
}),
).toEqual({
text: "pizza",
});
});
});
});

0 comments on commit a0f7a63

Please sign in to comment.