@davidsneighbour/cypress-config

2024.4.8 • 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

Readme

Keywords

none

Package Sidebar

Install

npm i @davidsneighbour/cypress-config

Weekly Downloads

83

Version

2024.4.8

License

MIT

Unpacked Size

5.59 kB

Total Files

6

Last publish

Collaborators

  • davidsneighbour