From a51b1141717fa12e7fb2517bd2ff754286f9a368 Mon Sep 17 00:00:00 2001 From: Paulo Pinto Date: Wed, 11 Aug 2021 14:51:36 +0100 Subject: [PATCH] Change order of test cases Just moving test cases so that "generic message" ones are grouped at the bottom. Signed-off-by: Paulo Pinto --- test/TextForEvent-test.ts | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/test/TextForEvent-test.ts b/test/TextForEvent-test.ts index 30bc68751a..285d4de232 100644 --- a/test/TextForEvent-test.ts +++ b/test/TextForEvent-test.ts @@ -76,16 +76,6 @@ describe('TextForEvent', () => { expect(renderComponent(component)).toBe(expectedText); }); - it("shows generic text when multiple messages were pinned", () => { - const event = mockPinnedEvent(['message-1', 'message-2', 'message-3'], ['message-1']); - const plainText = textForEvent(event); - const component = renderer.create(textForEvent(event, true)); - - const expectedText = "@foo:example.com changed the pinned messages for the room."; - expect(plainText).toBe(expectedText); - expect(renderComponent(component)).toBe(expectedText); - }); - it("mentions message when a single message was unpinned, with a single message previously pinned", () => { const event = mockPinnedEvent([], ['message-1']); const plainText = textForEvent(event); @@ -106,6 +96,16 @@ describe('TextForEvent', () => { expect(renderComponent(component)).toBe(expectedText); }); + it("shows generic text when multiple messages were pinned", () => { + const event = mockPinnedEvent(['message-1', 'message-2', 'message-3'], ['message-1']); + const plainText = textForEvent(event); + const component = renderer.create(textForEvent(event, true)); + + const expectedText = "@foo:example.com changed the pinned messages for the room."; + expect(plainText).toBe(expectedText); + expect(renderComponent(component)).toBe(expectedText); + }); + it("shows generic text when multiple messages were unpinned", () => { const event = mockPinnedEvent(['message-3'], ['message-1', 'message-2', 'message-3']); const plainText = textForEvent(event);