Skip to content

Latest commit

 

History

History
35 lines (24 loc) · 1.67 KB

File metadata and controls

35 lines (24 loc) · 1.67 KB

Educational repo of unit test samples

  • Tests are written using vitest using Jest like assertions.

Implemented features

  • Tests are executed automatically on GitHub using checks.yml workflow

  • Tests are executed automatically before every git push to the remote repository via pre-push Git Hook using Husky

  • For every git commit there is automatically being run (via pre-commit) ESLint that might do some more code improvements and also format code using Prettier

  • All git message are validated by commitlint via commit-msg

    • If your git commit -m "..." fails with husky - commit-msg script failed (code 1), please refer to Conventional Commits and read how professionals write commit messages

Getting started

  • Run npm i in the project root to install vitest

Directories

  • playground - Explains and gives examples of how basic assertions works
  • utils - Includes code samples with test coverage and some practical exercises

Best practices

Please check out list of examples here.