Tag: Jest
5 posts
-
Jest in Practice: Matchers, Async Tests, Mocks, Snapshots and Coverage in CI
Hands-on Jest guide: matchers, async tests, mocks, React Testing Library, snapshots, coverage thresholds, runner architecture, and CI patterns.
-
Testing React Components Like a User: Queries, user-event, Async Tests, Context and Hooks
Testing React components with React Testing Library: choosing queries, simulating user events, async testing, forms, context providers, custom hooks, and accessibility checks.
-
Mocking APIs with MSW: Handlers for the Browser and Node Tests, Runtime Overrides and GraphQL
Mocking APIs at the network level with Mock Service Worker: defining handlers, browser and Node.js setup, using MSW in tests, runtime handler overrides, GraphQL, and an e-commerce example.
-
Jest Mocking in Depth: Module Mocks vs spyOn, Async Pitfalls, Snapshots and Test Isolation
Jest mocking, snapshot, and coverage reference: module mocks vs. spies, async pitfalls, test isolation, and threshold configuration.
-
Node.js Testing: Jest, Mocha, and Supertest
Test Node.js apps with Jest matchers and mocks, async tests, Supertest for Express APIs, MongoDB memory server, integration tests.