
quackus
Test-Driven React 2: ToC and description have different test libraries
Hi everyone,
the book description on pragprog contains the following:
[…] easy-to-understand tests with Vitest and React Testing Library. […]
The table of contents suggest that Jest is being used in the book.
Test-Driven Development with Jest
Was Vitest replaced by Jest or vice versa?
Marked As Solved

TrevorBurnham
The first chapter uses Jest, but the rest of the book uses Vitest. I know that may feel a little over-complicated, but there’s method to the madness: Jest is the most popular test framework, and it stands on its own, so it’s easy to get up and running. Vitest, on the other hand, is tied to the Vite build system, which I wanted to use for the project that the book develops from Chapter 3 onward.
Vitest is designed to be Jest-compatible, so tests written for one framework will usually run just fine in the other.
I’ll try to make this all clearer in the next revision! Thanks for your feedback.
Popular Prag Prog topics










Other popular topics










Latest in PragProg
Latest (all)
Categories:
Popular Portals
- /elixir
- /opensuse
- /rust
- /kotlin
- /ruby
- /erlang
- /python
- /clojure
- /react
- /quarkus
- /go
- /vapor
- /react-native
- /v
- /wasm
- /django
- /security
- /nodejs
- /centos
- /rails
- /haskell
- /fable
- /gleam
- /js
- /swift
- /deno
- /tailwind
- /assemblyscript
- /laravel
- /symfony
- /phoenix
- /crystal
- /typescript
- /debian
- /adonisjs
- /julia
- /arch-linux
- /svelte
- /spring
- /c-plus-plus
- /flutter
- /preact
- /actix
- /java
- /angular
- /ocaml
- /kubuntu
- /zig
- /scala
- /zotonic
- /vim
- /rocky
- /lisp
- /keyboards
- /html
- /emacs
- /nim
- /vuejs
- /elm
- /nerves