Skip to content

Files

Latest commit

9d12f27 · Mar 26, 2025

History

History

component-tests

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
Jan 17, 2025
Feb 3, 2023
Mar 11, 2025
Feb 3, 2023
Feb 27, 2025
Mar 5, 2025
Aug 3, 2023
Mar 26, 2025
Mar 26, 2025
Feb 3, 2023

example: component-tests

This example was built as follows:

  1. Vite > Getting Started instructions with the react template were used to create the app

    npm create vite@latest component-tests -- --template react

    The linting npm modules and linting script have been removed, since this is out-of-scope for the example.

  2. The Cypress documentation instructions from Component Testing > Getting Started were followed to set up component testing, including copying

    from the Cypress Component Testing Quickstart Apps repo to this repo's examples/component-tests/src/components/ sub-directory.

  3. The script "test": "cypress run --component" was added to package.json.

Execution

Execute the following to change to this directory:

cd examples/component-tests

Install dependencies with:

npm ci

Run Cypress component testing with:

npm test