diff --git a/integration/rendering.test.tsx b/integration/rendering.test.tsx index 652227e..b5442bf 100644 --- a/integration/rendering.test.tsx +++ b/integration/rendering.test.tsx @@ -1,9 +1,11 @@ /* eslint-disable unicorn/no-null */ -import type { Message, MessageOptions } from "discord.js" +import type { ButtonInteraction, Message, MessageOptions } from "discord.js" import { Client, TextChannel } from "discord.js" +import { nanoid } from "nanoid" import React from "react" import { omit } from "../src/helpers/omit.js" import { raise } from "../src/helpers/raise.js" +import { waitForWithTimeout } from "../src/helpers/wait-for-with-timeout.js" import type { ReacordRoot } from "../src/main.js" import { ActionRow, @@ -112,17 +114,27 @@ test("kitchen sink", async () => { field content but inline - - - - - - + + + + + - + - + , ) @@ -231,6 +243,31 @@ test("kitchen sink", async () => { ]) }) +test("button onClick", async () => { + let clicked = false + + await root.render(