Fix emoticon slash commands including stale buffers (#32928)

This commit is contained in:
Michael Telatynski
2026-03-25 17:06:35 +00:00
committed by GitHub
parent e78ad200a5
commit ec47986ef5
2 changed files with 9 additions and 3 deletions
@@ -20,6 +20,11 @@ describe.each(["shrug", "tableflip", "unflip", "lenny"])("/%s", (commandName: st
it("should match snapshot with args", async () => {
const { client, command } = setUpCommandTest(roomId, `/${commandName}`);
await expect(command.run(client, roomId, null, "this is a test message").promise).resolves.toMatchSnapshot();
const initialResult = await command.run(client, roomId, null, "this is a test message").promise;
expect(initialResult).toMatchSnapshot();
// We run this twice to ensure it doesn't stack the buffer
await expect(command.run(client, roomId, null, "this is a test message").promise).resolves.toEqual(
initialResult,
);
});
});