Udemy - Vitest 50 Drills - TypeScript Unit Testing from the Groun...
Vitest 50 Drills: TypeScript Unit Testing from the Ground Up
https://WebToolTip.com
Published 8/2026
MP4 | Video: h264, 1920x1080 | Audio: AAC, 44.1 KHz, 2 Ch
Language: English | Duration: 7h 1m | Size: 1.7 GB
Don't just memorize Jest-style APIs. Master Vitest in 50 drills: mocks, fake timers, fixtures, snapshots, types, CI.
What you'll learn
Understand Vitest's execution model and its link to Vite, and explain why TypeScript/ESM tests run zero-config, wielding `globals` and `environment` correctly.
Design assertions that convey intent: three equality levels `toBe`/`toEqual`/`toStrictEqual`, asymmetric matchers, and custom matchers via `expect.extend`.
Compose fixtures with `test.extend` into a dependency graph, and design test preconditions that balance speed and isolation using `auto` and `scope:"worker"`.
Choose among `vi.fn`/`vi.spyOn`/`vi.mock`/`vi.stubGlobal`/`vi.stubEnv` per target, and correctly handle the three-tier clear/reset/restore and ESM hoisting.
Test async deterministically without waiting real time: `resolves`/`rejects`, `*Async` fake timers, `vi.waitFor`, `test.concurrent`, and `retry`/`repeats`.
Verify temporary-file I/O, in-memory SQLite, and a Hono+zod HTTP API with "real but fast" integration tests, and swap dependencies via dependency injection.
Put Vitest-only weapons to work in practice: snapshots, in-source tests, type tests with `expectTypeOf`, and benchmarks with `bench`.
Configure a coverage-threshold gate and unit/integration separation via `projects`, and build a locally reproducible mock CI to operationalize your tests.
Requirements
Able to read and write basic JavaScript/TypeScript (variables, functions, classes, `import`/`export`, `async`/`await`). No framework knowledge is needed.
A PC with an internet connection and a modern browser (Chrome recommended) is all you need. We use codesandbox, so there is no Node.js install or setup at all.
No testing experience required. Even if you've never written a single test, the course is built so you can start from the very first test in Chapter 0.