- Linting (ESLint): Check eslintrc file itself

- Linting: Add linting plugins (mocha, chai-expect, chai-friendly, cypress)
- Testing: Change cypress plugins file to ESM (so can set up any needed unit testing tasks)
This commit is contained in:
Brett Zamir
2020-02-21 16:34:55 +08:00
parent b1ceb3c911
commit e60812e196
6 changed files with 340 additions and 245 deletions

16
cypress/plugins/main.js Normal file
View File

@@ -0,0 +1,16 @@
// This function is called when a project is opened or re-opened (e.g. due to
// the project's config changing)
import codeCoverageTask from '@cypress/code-coverage/task.js';
// eslint-disable-next-line import/no-anonymous-default-export
export default (on, config) => {
// `on` is used to hook into various events Cypress emits
// `config` is the resolved Cypress config
// `on` is used to hook into various events Cypress emits
// `config` is the resolved Cypress config
// https://docs.cypress.io/guides/tooling/code-coverage.html#Install-the-plugin
on('task', codeCoverageTask);
};