A codemod for migrating React Testing Library or Enzyme tests to Cypress component tests!
Run against a single test file:
npx cypress-codemod --filePath path/to/my-test.tsx
Run recursively against all files in directory:
npx cypress-codemod --directory path/to/directory-containing-tests/
Option | Type | Description |
---|---|---|
--filePath , -f |
String | A path to a test file to migrate. If ommitted, --directory is required. |
--directory , -d |
String | A directory containing test files to migrate. If ommitted, --filePath is required. |
--customMountCommand |
String | A custom command to use instead of cy.mount() |
--customDOMEmptyCommand |
String | A custom command to use for asserting the DOM is empty. |