// @ts-check const { defineConfig } = require('cypress') const cypressSplit = require('./src') module.exports = defineConfig({ e2e: { // baseUrl, etc supportFile: false, fixturesFolder: false, excludeSpecPattern: '*.hot-update.js', setupNodeEvents(on, config) { const orderSpecs = (specs) => { specs.sort().reverse() return specs } cypressSplit(on, config, orderSpecs) // IMPORTANT: return the config object return config }, }, component: { devServer: { framework: 'react', bundler: 'vite', }, specPattern: 'components/*.cy.js', setupNodeEvents(on, config) { cypressSplit(on, config) // IMPORTANT: return the config object return config }, }, })