fix(api): 🐛 Fix error when masto-fe stupidly sends empty spoiler_text
Some checks failed
Mirror to Codeberg / Mirror (push) Failing after 0s
Test Publish / build (client) (push) Failing after 0s
Test Publish / build (sdk) (push) Failing after 0s

This commit is contained in:
Jesse Wierzbinski 2025-06-23 18:53:40 +02:00
parent aff51b651c
commit 59cd519337
No known key found for this signature in database
2 changed files with 17 additions and 1 deletions

View file

@ -246,6 +246,20 @@ describe("/api/v1/statuses", () => {
expect(ok3).toBe(false);
});
test("should work with an empty spoiler_text", async () => {
await using client = await generateClient(users[0]);
const { data, ok } = await client.postStatus("Hello, world!", {
spoiler_text: "",
});
expect(ok).toBe(true);
expect(data).toMatchObject({
content: "<p>Hello, world!</p>",
spoiler_text: "",
});
});
describe("mentions testing", () => {
test("should correctly parse @mentions", async () => {
await using client = await generateClient(users[0]);