diff --git a/packages/vue2/tests/cypress.config.ts b/packages/vue2/tests/cypress.config.js similarity index 56% rename from packages/vue2/tests/cypress.config.ts rename to packages/vue2/tests/cypress.config.js index ded4d8506..e0e20c6ce 100644 --- a/packages/vue2/tests/cypress.config.ts +++ b/packages/vue2/tests/cypress.config.js @@ -1,9 +1,12 @@ -import { defineConfig } from 'cypress' +const { defineConfig } = require('cypress') -export default defineConfig({ +module.exports = defineConfig({ e2e: { specPattern: 'cypress/integration/*.{js,jsx,ts,tsx}', baseUrl: 'http://localhost:13715', + setupNodeEvents(on, config) { + require('cypress-fail-fast/plugin')(on, config) + }, video: false, screenshotOnRunFailure: false, retries: { diff --git a/packages/vue2/tests/cypress/plugins/index.js b/packages/vue2/tests/cypress/plugins/index.js deleted file mode 100644 index 7ce6b9772..000000000 --- a/packages/vue2/tests/cypress/plugins/index.js +++ /dev/null @@ -1,23 +0,0 @@ -/// -// *********************************************************** -// This example plugins/index.js can be used to load plugins -// -// You can change the location of this file or turn off loading -// the plugins file with the 'pluginsFile' configuration option. -// -// You can read more here: -// https://on.cypress.io/plugins-guide -// *********************************************************** - -// This function is called when a project is opened or re-opened (e.g. due to -// the project's config changing) - -/** - * @type {Cypress.PluginConfig} - */ -module.exports = (on, config) => { - require('cypress-fail-fast/plugin')(on, config) - return config - // `on` is used to hook into various events Cypress emits - // `config` is the resolved Cypress config -} diff --git a/packages/vue2/tests/cypress/support/e2e.js b/packages/vue2/tests/cypress/support/e2e.js index 9108781cb..2b459a3fa 100644 --- a/packages/vue2/tests/cypress/support/e2e.js +++ b/packages/vue2/tests/cypress/support/e2e.js @@ -1,4 +1,3 @@ -import 'cypress-fail-fast' // *********************************************************** // This example support/index.js is processed and // loaded automatically before your test files. @@ -16,6 +15,7 @@ import 'cypress-fail-fast' // Import commands.js using ES2015 syntax: import './commands' +import 'cypress-fail-fast' // Alternatively you can use CommonJS syntax: // require('./commands')