Skip to content

Commit

Permalink
fix: plugin file in angular schematics (#17141)
Browse files Browse the repository at this point in the history
Runnin g`ng add @cypress/schematic --defaults --skip-confirmation` in a new Angular 12 application results in a broken setup for cypress,
as the plugin file does not have any export.

When running `ng e2e`, Cypress complains with:

```
The plugins file is missing or invalid.

Your `pluginsFile` is set to `/Users/ced-pro/Code/angular/angular-cli-diff/ponyracer/cypress/plugins/index.js`, but either the file is missing, it contains a syntax error, or threw an error when required. The `pluginsFile` must be a `.js`, `.ts`, or `.coffee` file.

Or you might have renamed the extension of your `pluginsFile`. If that's the case, restart the test runner.

Please fix this, or set `pluginsFile` to `false` if a plugins file is not necessary for your project.
```

This commit reverts the changes to the plugin file made in 96a9db4
and fixes the issue.
  • Loading branch information
cexbrayat committed Jun 29, 2021
1 parent 7052c67 commit 7b4d694
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
// Plugins enable you to tap into, modify, or extend the internal behavior of Cypress
// For more info, visit https://on.cypress.io/plugins-api
module.exports = (on, config) => {}

0 comments on commit 7b4d694

Please sign in to comment.