Tools used to test the application:
- ESLint (static code analysis of JS files)
- Stylelint (static code analysis of CSS files)
- Markdownlint (static code analysis of Markdown files)
- Jest (unit tests)
- Playwright (visual and functional component testing)
Generally, npm test and npm run test:playwright-ct:all should be run within
their designated Docker containers before pushing changes to the repository.
You can run all tests with a single command:
npm run lint && npm test && npm run test:playwright-ct:allRun linters either all together:
npm run lintor run linters individually:
npm run <eslint|markdownlint|stylelint>npm run test:jestTest parameters can be tweaked by creating and tweaking .env file.
Run tests:
npm run test:playwright-ct:<all|all-with-update>You can also run specific tests by passing a path to the test files:
npm run test:playwright-ct:<all|all-with-update> -- -- <match_path>You can also pass any CLI command to the test runner:
npm run test:playwright-ct:<all|all-with-update> -- -- <cli_argument>After running Playwright tests, test report can be served by using the following command:
npm run test:playwright-ct:show-reportThen open the displayed URL (typically http://localhost:9323)
in your browser. Please note that the test report is only available
if the tests were run prior to serving the report.