Options
All
  • Public
  • Public/Protected
  • All
Menu

Class ReacordTester

Hierarchy

Index

Constructors

constructor

Accessors

messages

  • get messages(): readonly TestMessage[]

Methods

assertMessages

  • assertMessages(expected: { actionRows: (Omit<MessageButtonOptions, "customId" | "onClick" | "onSelect" | "onSelectValue"> | Omit<MessageLinkOptions, "customId" | "onClick" | "onSelect" | "onSelectValue"> | Omit<MessageSelectOptions, "customId" | "onClick" | "onSelect" | "onSelectValue">)[][]; content: string; embeds: { author: undefined | { name: string; url?: string | undefined; icon_url?: string | undefined; }; color: undefined | number; description: undefined | string; fields: undefined | { name: string; value: string; inline?: boolean | undefined; }[]; footer: undefined | { text: string; icon_url?: string | undefined; }; image: undefined | { url: string; }; thumbnail: undefined | { url: string; }; timestamp: undefined | string; title: undefined | string; url: undefined | string; video: undefined | { url: string; } }[] }[]): Promise<void>
  • Parameters

    • expected: { actionRows: (Omit<MessageButtonOptions, "customId" | "onClick" | "onSelect" | "onSelectValue"> | Omit<MessageLinkOptions, "customId" | "onClick" | "onSelect" | "onSelectValue"> | Omit<MessageSelectOptions, "customId" | "onClick" | "onSelect" | "onSelectValue">)[][]; content: string; embeds: { author: undefined | { name: string; url?: string | undefined; icon_url?: string | undefined; }; color: undefined | number; description: undefined | string; fields: undefined | { name: string; value: string; inline?: boolean | undefined; }[]; footer: undefined | { text: string; icon_url?: string | undefined; }; image: undefined | { url: string; }; thumbnail: undefined | { url: string; }; timestamp: undefined | string; title: undefined | string; url: undefined | string; video: undefined | { url: string; } }[] }[]

    Returns Promise<void>

assertRender

  • assertRender(content: ReactNode, expected: { actionRows: (Omit<MessageButtonOptions, "customId" | "onClick" | "onSelect" | "onSelectValue"> | Omit<MessageLinkOptions, "customId" | "onClick" | "onSelect" | "onSelectValue"> | Omit<MessageSelectOptions, "customId" | "onClick" | "onSelect" | "onSelectValue">)[][]; content: string; embeds: { author: undefined | { name: string; url?: string | undefined; icon_url?: string | undefined; }; color: undefined | number; description: undefined | string; fields: undefined | { name: string; value: string; inline?: boolean | undefined; }[]; footer: undefined | { text: string; icon_url?: string | undefined; }; image: undefined | { url: string; }; thumbnail: undefined | { url: string; }; timestamp: undefined | string; title: undefined | string; url: undefined | string; video: undefined | { url: string; } }[] }[]): Promise<void>
  • Parameters

    • content: ReactNode
    • expected: { actionRows: (Omit<MessageButtonOptions, "customId" | "onClick" | "onSelect" | "onSelectValue"> | Omit<MessageLinkOptions, "customId" | "onClick" | "onSelect" | "onSelectValue"> | Omit<MessageSelectOptions, "customId" | "onClick" | "onSelect" | "onSelectValue">)[][]; content: string; embeds: { author: undefined | { name: string; url?: string | undefined; icon_url?: string | undefined; }; color: undefined | number; description: undefined | string; fields: undefined | { name: string; value: string; inline?: boolean | undefined; }[]; footer: undefined | { text: string; icon_url?: string | undefined; }; image: undefined | { url: string; }; thumbnail: undefined | { url: string; }; timestamp: undefined | string; title: undefined | string; url: undefined | string; video: undefined | { url: string; } }[] }[]

    Returns Promise<void>

findButtonByLabel

  • findButtonByLabel(label: string): { click: () => void }
  • Parameters

    • label: string

    Returns { click: () => void }

    • click: () => void
        • (): void
        • Returns void

findSelectByPlaceholder

  • findSelectByPlaceholder(placeholder: string): { select: (...values: string[]) => void }
  • Parameters

    • placeholder: string

    Returns { select: (...values: string[]) => void }

    • select: (...values: string[]) => void
        • (...values: string[]): void
        • Parameters

          • Rest ...values: string[]

          Returns void

logMessages

  • logMessages(): void

reply

sampleMessages

  • sampleMessages(): { actionRows: (Omit<MessageButtonOptions, "customId" | "onClick" | "onSelect" | "onSelectValue"> | Omit<MessageLinkOptions, "customId" | "onClick" | "onSelect" | "onSelectValue"> | Omit<MessageSelectOptions, "customId" | "onClick" | "onSelect" | "onSelectValue">)[][]; content: string; embeds: { author: undefined | { name: string; url?: string | undefined; icon_url?: string | undefined; }; color: undefined | number; description: undefined | string; fields: undefined | { name: string; value: string; inline?: boolean | undefined; }[]; footer: undefined | { text: string; icon_url?: string | undefined; }; image: undefined | { url: string; }; thumbnail: undefined | { url: string; }; timestamp: undefined | string; title: undefined | string; url: undefined | string; video: undefined | { url: string; } }[] }[]
  • Returns { actionRows: (Omit<MessageButtonOptions, "customId" | "onClick" | "onSelect" | "onSelectValue"> | Omit<MessageLinkOptions, "customId" | "onClick" | "onSelect" | "onSelectValue"> | Omit<MessageSelectOptions, "customId" | "onClick" | "onSelect" | "onSelectValue">)[][]; content: string; embeds: { author: undefined | { name: string; url?: string | undefined; icon_url?: string | undefined; }; color: undefined | number; description: undefined | string; fields: undefined | { name: string; value: string; inline?: boolean | undefined; }[]; footer: undefined | { text: string; icon_url?: string | undefined; }; image: undefined | { url: string; }; thumbnail: undefined | { url: string; }; timestamp: undefined | string; title: undefined | string; url: undefined | string; video: undefined | { url: string; } }[] }[]

send

Generated using TypeDoc