The default JS workflow consists of 4 types of tests, which are described below
This will run linting for the project, most commonly eslint. In practice, the workflow will run the npm script lint.
To run this locally you would typically do something like this:
npm run lintOr if your project is set up with ddev for local development:
ddev npm run lintThis will run type checks for the project, usually typescript. In practice, the workflow will run the npm script type-check
To run this locally you would typically do something like this:
npm run type-checkOr if your project is set up with ddev for local development:
ddev npm run type-checkThis will run unit tests for the project. For example jest. In practice, the workflow will run the npm script unit
To run this locally you would typically do something like this:
npm run unitOr if your project is set up with ddev for local development:
ddev npm run unitThis will run unit tests for the project. For example cypress.
There are currently 2 approaches for this. Either the project will be set up to run the npm script e2e. Or it will be set up to use the GitHub action for Cypress.
If the project uses the npm script e2e you can run this locally with something like this:
npm run e2eOr if your project is set up with ddev for local development:
ddev npm run e2eIf the project uses the cypress github action you can run this locally with something like this:
npx cypress runIf you project is set up with ddev for local development, please see the docs for cypress and ddev