Skip to content

Markdown tutorials for JavaScript tools (static analysis, tests, and more)

Notifications You must be signed in to change notification settings

manoncarbonnel/js-tools-tutorials

Repository files navigation

js-tools-tutorials

Markdown tutorials for JavaScript tools (static analysis, tests, and more)

VueJS Vite ESLint Prettier Pre-commit Jest Cypress

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

Documentation

All reports (tests, coverage, linters, ...) are located in the reports directory.

Prerequisites

Linux

Windows

Cypress

Installing Cypress

Build

Localy

npm run build

Usage

Dependencies install

Download and install dependencies using npm :

npm install

Update dependencies

npm update

Validate installation

Start frontend on localhost using:

npm run dev

Access the web UI on http://127.0.0.1:9000/

Lint

Lint code using Eslint

npm run lint

Format

Format code using Prettier and Eslint

npm run lint:fix

Test

Write and launch tests using Vitest/Jest and Cypress

Unit tests

Tests are located in tests/vitest directory.

npm run test

Functional tests

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

About

Markdown tutorials for JavaScript tools (static analysis, tests, and more)

Topics

Resources

Stars

Watchers

Forks