Markdown tutorials for JavaScript tools (static analysis, tests, and more)
A clean code should follow theses rules:
- documented (JSDOC)
- simple (KISS)
- well structured (SOLID)
- only what is necessary (YAGNI)
- no duplicated code (DRY)
- tested (TU)
To help you achieve this goal, you can use several tools. See:
Summary
All reports (tests, coverage, linters, ...) are located in the reports
directory.
Linux
Windows
Cypress
npm run build
Download and install dependencies using npm :
npm install
npm update
Start frontend on localhost using:
npm run dev
Access the web UI on http://127.0.0.1:9000/
Lint code using Eslint
npm run lint
Format code using Prettier and Eslint
npm run lint:fix
Write and launch tests using Vitest/Jest and Cypress
Tests are located in tests/vitest
directory.
npm run test
Tests are located in tests/cypress
directory.
To run tests in a shell:
npm run cypress:run
To run tests using Cypress studio:
npm run cypress:open