Skip to content
This repository was archived by the owner on May 24, 2021. It is now read-only.
This repository was archived by the owner on May 24, 2021. It is now read-only.

fyi - using plugin with typescript support index.ts #70

@craigryan

Description

@craigryan

We have an nx monorepo with apps/proj-e2e directory. Cypress is set up with plugins/index.js and require('cypress-plugin-retries/lib/plugin')(on) as required. However, the support files were setup with typescript - index.ts, app.po.ts etc. Trying this:

require('cypress-plugin-retries');

Failed when running a single spec (ie: ng run proj-e2e:e2e --spec...) with the error
TS2339: Property 'currentTest' does not exist on type 'Cypress & EventEmitter'

To get the plugin to work with both running single specs (headless) and also via the cypress app I made a simple change to import the plugin instead and its all good:

// Import commands.js using ES2015 syntax:
import './commands';
import 'cypress-plugin-retries';

hope this helps.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions