JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 940
  • Score
    100M100P100Q111104F
  • License MIT

A simple local visual testing for Cypress users

Package Exports

    This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@bahmutov/cypress-toy-visual-testing) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

    Readme

    @bahmutov/cypress-toy-visual-testing main

    A simple local visual testing for Cypress users

    Install

    Add this plugin as a dev dependency

    npm i -D @bahmutov/cypress-toy-visual-testing

    Set it up from your `` hook in the Cypress config file:

    // cypress.config.js
    
    const { defineConfig } = require('cypress')
    // https://github.com/bahmutov/cypress-toy-visual-testing
    const {
      setupVisualTesting,
    } = require('@bahmutov/cypress-toy-visual-testing/dist/plugin/setup')
    
    module.exports = defineConfig({
      e2e: {
        setupNodeEvents(on, config) {
          setupVisualTesting(on, config)
          return config
        },
      },
    })

    Add custom commands to your support file:

    // cypress/support/e2e.js
    
    // https://github.com/bahmutov/cypress-toy-visual-testing
    import '@bahmutov/cypress-toy-visual-testing/dist/support/commands'

    Use

    Take full page screenshots

    cy.imageDiff('added-todos')