Jest
js projects.
22 resources across 3 libraries
Glossary Terms(4)
XCTest
XCTest is Apple's native testing framework, bundled with Xcode, for writing and running unit tests, UI tests, and performance tests for Swift and Objective-C a…
Cypress
Cypress is a JavaScript-based end-to-end testing framework that runs directly inside the browser alongside the application under test, providing fast, reliable…
Jest
Jest is a JavaScript testing framework, originally built by Meta, focused on simplicity and zero-configuration setup, widely used for testing React and Node.js…
AssertJ
AssertJ is a Java assertion library that provides a fluent, chainable API for writing expressive, readable assertions in unit tests.
Study Notes(17)
Code Coverage with Jest
Understand how Jest measures code coverage across statements, branches, functions, and lines, and how to enforce thresholds in CI.
Installing and Configuring Jest
How to add Jest to a JavaScript or TypeScript project, and the key configuration options in jest.config.js.
Jest Best Practices
Practical guidelines for writing fast, reliable, and maintainable Jest test suites that catch real bugs without becoming brittle.
Jest Configuration: Multi-Project Setups
Learn how to configure Jest's projects array to run multiple test environments and configurations, like unit and integration suites, from a single Jest invocat…
Jest in CI/CD Pipelines
How to configure Jest to run reliably, quickly, and with useful reporting inside continuous integration pipelines.
Jest in Monorepos
Learn how to configure Jest to run efficiently across multiple packages in a monorepo, covering shared config, workspace-aware discovery, and CI caching.
Jest Interview Questions
Common Jest interview topics covering mocks, async testing, fake timers, and module mocking, with the reasoning behind each answer.
Jest Quick Reference
A condensed cheat sheet of essential Jest CLI flags, matchers, lifecycle hooks, and config keys for day-to-day use.
Jest vs Vitest vs Mocha
How Jest compares to Vitest and Mocha in philosophy, speed, and ecosystem so you can pick the right test runner.
Mock Functions with jest.fn()
Learn how to create, configure, and inspect Jest mock functions to isolate units under test and verify how dependencies are called.
Mocking Modules with jest.mock()
Understand how jest.mock() replaces entire modules with automatic or manual mocks, and how to combine that with jest.requireActual for partial mocking.
Running and Watching Tests
How to run Jest from the command line, use watch mode for fast feedback, and interpret coverage output.
Spying on Functions with jest.spyOn()
Learn how jest.spyOn() wraps real methods to track and optionally override their behavior, and how it differs from a plain jest.fn() mock.
Truthiness and Number Matchers
Master Jest's matchers for null, undefined, and boolean-like values, plus numeric comparisons including safe handling of floating-point precision.
What Is Jest?
An introduction to Jest, the all-in-one JavaScript testing framework built by Meta for unit, integration, and snapshot testing.
Writing Your First Test
A hands-on walkthrough of writing, running, and understanding your first Jest test file.
Testing Node Apps with Jest
Learn to write unit and integration tests for Node.js and Express apps using Jest and Supertest.