{"library":"vitest-launchdarkly-mock","type":"library","category":null,"description":"This package, `vitest-launchdarkly-mock`, provides essential utilities for unit testing React components that integrate with LaunchDarkly feature flags within a Vitest testing environment. Currently at version 1.2.3, it offers a robust solution for isolating UI components by mocking the `launchdarkly-react-client-sdk`'s `useFlags` hook and the underlying `ldClient`. The library's release cadence is generally stable, receiving updates primarily to align with new major versions of Vitest or the LaunchDarkly React SDK, rather than frequent, independent releases. Its key differentiator is its direct adaptation from `jest-launchdarkly-mock`, specifically tailored for the Vitest ecosystem, allowing developers to leverage a familiar mocking pattern when transitioning or developing Vitest-based tests. It enables developers to precisely control feature flag states for individual tests and assert interactions with the LaunchDarkly client, ensuring reliable and repeatable test outcomes without external dependencies on the LaunchDarkly service itself. The package is focused on the React SDK integration, making it a specialized tool for React applications.","language":"javascript","status":"active","version":"1.2.3","tags":["javascript","vitest","launchdarkly","mock","typescript"],"last_verified":"Wed May 27","install":[{"cmd":"npm install vitest-launchdarkly-mock","imports":["import { mockFlags } from 'vitest-launchdarkly-mock'","import { ldClientMock } from 'vitest-launchdarkly-mock'","import { resetLDMocks } from 'vitest-launchdarkly-mock'"]},{"cmd":"yarn add vitest-launchdarkly-mock","imports":[]},{"cmd":"pnpm add vitest-launchdarkly-mock","imports":[]}],"homepage":"https://www.npmjs.com/package/vitest-launchdarkly-mock","github":"https://github.com/bohdanbirdie/vitest-launchdarkly-mock","docs":null,"changelog":null,"pypi":null,"npm":"https://www.npmjs.com/package/vitest-launchdarkly-mock","openapi_spec":null,"status_page":null,"smithery":null,"compatibility":{"summary":{"python_range":"18–22","success_rate":0,"avg_install_s":null,"avg_import_s":null,"wheel_type":null},"url":"https://checklist.day/v1/registry/vitest-launchdarkly-mock/compatibility"}}