mirror of
https://github.com/cypress-io/cypress.git
synced 2026-01-11 01:10:24 -06:00
* Remove useless code * Add code-coverage to reacr devDependencies * Remove react/support imports * Remove some useless code from @cypress/react * Cleanup vue * Make it works :) * Fix react errors * Fix next.js react example Co-authored-by: Lachlan Miller <lachlan.miller.1990@outlook.com> Co-authored-by: Barthélémy Ledoux <bart@cypress.io>
example: react-scripts-folder
A typical project using
react-scriptswith components in the src folder and component tests inside cypress/component folder.
Cypress automatically finds Webpack settings used by react-scripts and inserts the component folder name allowing to transpile the component specs the same way the src code is transpiled.
Usage
- Make sure the root project has been built .
# in the root of the project
npm install
npm run build
- Run
npm installin this folder to symlink the@cypress/reactdependency.
# in this folder
npm install
- Start Cypress
npm run cy:open
# or just run headless tests
npm test
