Skip to content

Latest commit

 

History

History

cypress-config

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 

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