AccessorsType: Readonly<{
    find: (() => Promise<HTMLElement>);
    findAll: (() => Promise<HTMLElement[]>);
    get: (() => HTMLElement);
    getAll: (() => HTMLElement[]);
    query: (() => HTMLElement | null);
    queryAll: (() => HTMLElement[]);
}>

Type of the result of testing-library query

See https://testing-library.com/docs/queries/about/#types-of-queries

Type declaration

  • find: (() => Promise<HTMLElement>)
      • (): Promise<HTMLElement>
      • wait for single mathed element and return them

        Returns Promise<HTMLElement>

        promise with all matched elements

        Throws

        if there are no matched elements

        Throws

        if there are more than one matched elements

  • findAll: (() => Promise<HTMLElement[]>)
      • (): Promise<HTMLElement[]>
      • wait for mathed elements and return them

        Returns Promise<HTMLElement[]>

        promise with all matched elements

        Throws

        if there are no matched elements

  • get: (() => HTMLElement)
      • (): HTMLElement
      • Returns HTMLElement

        a single matched element

        Throws

        if there are no matched elements

        Throws

        if there are more than one matched elements

  • getAll: (() => HTMLElement[])
      • (): HTMLElement[]
      • Returns HTMLElement[]

        all matched elements

        Throws

        if there are no matched elements

  • query: (() => HTMLElement | null)
      • (): HTMLElement | null
      • Returns HTMLElement | null

        a single matched element or null

        Throws

        if there are more than one matched elements

  • queryAll: (() => HTMLElement[])
      • (): HTMLElement[]
      • Returns HTMLElement[]

        all matched elements

Generated using TypeDoc