Skip to content
This repository was archived by the owner on Jan 31, 2023. It is now read-only.
This repository was archived by the owner on Jan 31, 2023. It is now read-only.

Typescript: Cannot both import onlyOn and use cy.onlyOn #164

@samueldmeyer

Description

@samueldmeyer

In v2.6.0, Typescript threw errors when onlyOn was imported, but worked correctly for cy.onlyOn. Now in v2.6.1 (after #143), Typescript correctly types the onlyOn import, but cy.onlyOn does not have a type.

Is there any way to get both of these to work with Typescript?

import { onlyOn } from '@cypress/skip-test'; // error here in 2.6.0: File '.../node_modules/@cypress/skip-test/index.d.ts' is not a module. onlyOn('integration', () => { describe('stuff', () => { cy.onlyOn('mac'); // Error here in 2.6.1: Property 'onlyOn' does not exist on type 'cy & EventEmitter' }) });

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions