Перейти к содержимому

Never Break Auth Again: Testing Helpers & Utilities | Component Testing with React Testing Library

Codepoint

0:00 / 0:00

Never Break Auth Again: Testing Helpers & Utilities | Component Testing with React Testing Library

9 просмотров · 3 недели назад
Codepoint
44 подписчика
9 просмотров · 3 недели назад
Forty tests running in one second — that's what mocking buys you. This video covers vi.mock and how to swap the real Prisma client for a fake one so unit tests stay fast, isolated, and focused on your route logic instead of your database. We rebuild the createTask API route test with a mocked client and talk about exactly where the mocking boundary should sit. Testing Taskmaster continues — next video moves to real integration tests against real Postgres. #prisma #vitest #mocking #unittesting #webdev #nextjs #apitesting #coding