Configure project to use ES6 modules to enable top-level await capabilities. This change helps project to align well with modern JS standards. - Set `type` to `module` in `package.json`. - Use import/export syntax in Cypress configuration files. - Rename configurations files that do not support modules to use the `.cjs` extension: - `vue.config.js` to `vue.config.cjs` (vuejs/vue-cli#4477). - `babel.config.js` to `babel.config.cjs (babel/babel-loader#894) - `.eslintrc.js` to `.eslintrc.cjs` (eslint/eslint#13440, eslint/eslint#14137) - `postcss.config.js` to `postcss.config.cjs` (postcss/postcss#1771) - Provide a workaround for Vue CLI & Mocha ES6 modules conflict in Vue configuration file (vuejs/vue-cli#7417).
16 lines
455 B
TypeScript
16 lines
455 B
TypeScript
import { defineConfig } from 'cypress';
|
|
import setupPlugins from './tests/e2e/plugins/index.js';
|
|
|
|
export default defineConfig({
|
|
fixturesFolder: 'tests/e2e/fixtures',
|
|
screenshotsFolder: 'tests/e2e/screenshots',
|
|
videosFolder: 'tests/e2e/videos',
|
|
e2e: {
|
|
setupNodeEvents(on, config) {
|
|
return setupPlugins(on, config);
|
|
},
|
|
specPattern: 'tests/e2e/specs/**/*.cy.{js,jsx,ts,tsx}',
|
|
supportFile: 'tests/e2e/support/index.js',
|
|
},
|
|
});
|