NestJS Unit Testing with Jest: Mock PrismaService and Test JWT Auth e8
46 min1K views
About this video
Everything we built last episode was verified by hand with Docker running. That does not scale, so this episode replaces all of it with a test suite that finishes in three seconds with nothing else started.
We wire Jest and ts-jest into the NestJS backend, build a testing module with Test.createTestingModule, swap PrismaService for a plain object made of jest.fn, and unit test the real AuthService.
Keep learning NestJS
Every free video, mini course and project-based course on NestJS in one place, in the order that makes sense.
More free videos
All videos
Duration 18:52NestJSNestJS Auth Part 3: Roles Decorator, RolesGuard and Seller-Only Routes: E9
811 views · Sep 20, 2026
Duration 42:50NestJSThe Only Way to Handle Refresh Tokens in NestJS (Production Guide) E-7
979 views · Aug 30, 2026
Duration 1:20:41NestJSHow to Build an AI Shopping Agent with NestJS (Tool Calling + Guardrails) – Ep 13
746 views · Oct 18, 2026
Duration 1:13:03NestJSBuild AI Chat with Semantic Search in NestJS (Streaming + Smart Router) – Ep 12
659 views · Oct 11, 2026
Duration 32:31NestJSSemantic Search with OpenSearch & Embeddings in NestJS (Step by Step) – Ep 11
748 views · Oct 4, 2026
Duration 24:19NestJSBuild an Orders API in NestJS: Nested Prisma Writes and Server-Side Totals E-10
603 views · Sep 27, 2026
