Jest LaunchDarkly Mock

JSON →
library 2.2.1 ·javascript
verified May 27, 2026

jest-launchdarkly-mock is a utility package designed to simplify unit testing of React components that integrate with LaunchDarkly feature flags. It provides a straightforward API to mock feature flag states and the LaunchDarkly client within Jest test environments, specifically for applications using the `launchdarkly-react-client-sdk`. The current stable version is 2.2.1, with releases occurring periodically to address bugs and support new features of the underlying LaunchDarkly SDKs. Key differentiators include its tight integration with Jest for mocking, its explicit support for React SDK hooks like `useFlags`, and its ability to simulate client-side LaunchDarkly behavior without network calls. It supports LaunchDarkly's custom contexts feature introduced in v2.0.0, which evolved from the 'users' concept. The library is primarily used in TypeScript projects, shipping with its own type definitions.

total hits 16
actors 8 distinct systems
last hit 20h ago human
MetaBot
4
GPTBot
2
Script
1
ClaudeBot
1
Search engines
2
Humans
1

top countries 🇺🇸 United States · 🇫🇷 France · 🇨🇦 Canada · 🇩🇪 Germany