Skip to content

Commit

Permalink
Merge branch 'main' into prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
gunzip authored Feb 8, 2024
2 parents 3d35e94 + 89011ce commit 7dfc923
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 0 deletions.
12 changes: 12 additions & 0 deletions radar/tools/jest.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
title: "Jest"
ring: hold
quadrant: "tools"
tags: [typescript, frontend, web, backend, testing]
---

[Jest](https://jestjs.io/) is a JavaScript Testing Framework with a focus on simplicity.

We choose to hold Jest because we are currently using it in our projects, but we are switching to Vitest. Vitest offers Typescript support out of the box, and it's a good fit for our projects, while Jest requires some additional configuration (ie. ts-jest, etc.).

As Vitest offers compatibility with most of the Jest API and ecosystem libraries, so in most projects, it should be a drop-in replacement for Jest. Moreover, Vitest gives you a faster run for your unit tests and a jump in DX thanks to the default watch mode using Vite instant Hot Module Reload (HMR).
22 changes: 22 additions & 0 deletions radar/tools/vitest.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
title: "Vitest"
ring: adopt
quadrant: "tools"
tags: [typescript, frontend, web, backend, testing]
---

[Vitest](https://vitest.dev/) is a testing framework powered by Vite.

> Even if your library is not using Vite, Vitest is an interesting option as it gives you a faster run for your unit tests and a jump in DX thanks to the default watch mode using Vite instant Hot Module Reload (HMR).
> Vitest offers compatibility with most of the Jest API and ecosystem libraries, so in most projects, it should be a drop-in replacement for Jest.
## Use cases

- Unit testing in TypeScript projects

## Reference of usage in our organization

A list of repositories where Vitest is applied successful in a production environment:

https://github.com/search?q=org%3Apagopa+vitest%2Fconfig&type=code

0 comments on commit 7dfc923

Please sign in to comment.