Skip to content

puppeteer-declarations.d.ts file has incorrect function signature for classList.contains #1207

@mmakrzem

Description

@mmakrzem

Stencil version:

 @stencil/core@0.15.2

I'm submitting a:

[X ] bug report
[ ] feature request
[ ] support request => Please do not submit support requests here, use one of these channels: https://stencil-worldwide.herokuapp.com/ or https://forum.ionicframework.com/

Current behavior:

The file found in:
node_modules\@stencil\core\dist\testing\puppeteer\puppeteer-declarations.d.ts

contains the following inside of the interface E2EElement:

classList: {
        /**
         * Add specified class values. If these classes already exist in
         * attribute of the element, then they are ignored.
         */
        add: (...tokens: string[]) => void;
        /**
         * Remove specified class values. Note: Removing a class that does
         * not exist does NOT throw an error.
         */
        remove: (...tokens: string[]) => void;
        /**
         * If class exists then remove it, if not, then add it.
         */
        toggle: (token: string) => void;
        /**
         * Checks if specified class value exists in class attribute of the element.
         */
        contains: (className: string) => void;
    };

Expected behavior:
The contains function should not be returning a void, but rather be returning a boolean like so:
contains: (className: string) => boolean;

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions