@davidsneighbour/cypress-config

2025.1.1 • Public • Published

Create tests/cypress/plugins.index.js with the following content:

// noinspection JSUnresolvedVariable
module.exports = (on, config) =>
  // eslint-disable-next-line global-require
  require("@davidsneighbour/config/cypress")(config.configFile);

Then add in cypress.json at least the following two lines:

{
  "extends": "@davidsneighbour/confing/cypress-base.json",
  "pluginsFile": "tests/cypress/plugins/index.js"
}

This configuration setup uses the approach of Gleb Bahmutov's blog post.

Default settings of this configuration

  • All cypress files reside within the tests directory (no need for additional directories in the root directory).
  • The base url is set to http://localhost:1313 - default for all Hugo dev server instances.
  • IDEs like IntelliJ import the schema to offer typeahead code hints.
  • watchForFileChanges is enabled.

All configurations

Configurations
Build Tools
Babel Webpack
Testing
Cypress HTML Validate
Linters and Formatters
Browserslist ESLint PostCSS
Prettier Stylelint
Project Management
Commitlint Release
Markdown and Writing
Markdownlint Remark Lint
Other Tools
Bootstrap Tools

/@davidsneighbour/cypress-config/

    Package Sidebar

    Install

    npm i @davidsneighbour/cypress-config

    Weekly Downloads

    28

    Version

    2025.1.1

    License

    MIT

    Unpacked Size

    5.58 kB

    Total Files

    6

    Last publish

    Collaborators

    • davidsneighbour