All notable changes to the jest-launchdarkly-mock package will be documented in this file. This project adheres to Semantic Versioning.
v0.2.1 28-Jun-2021
- Added support to mock
withLDProvider
v0.1.1 8-Oct-2020
- Initial release
- useFlags now returns an empty object by default, which matches its actual implementation.
- Improved mockFlags docs to make it clear it only works with useFlags
- Updated example app's react and js sdk versions to fix typescript issues when running tests
- The
useLDClientError
mock function has been added. Thank you @manelmadeira.
The latest version of jest-launchdarkly-mock supports LaunchDarkly's new custom contexts feature. Contexts are an evolution of a previously-existing concept, "users." For more information please read the JavaScript SDK's latest release notes.
For detailed information about this version, please refer to the list below. For information on how to upgrade from the previous version, please read the migration guide.
- The
getContext
mock function has been added.
- The
getUser
mock function has been removed. Please usegetContext
instead. - The
alias
mock function has been removed.
- Updated react peer dep to > 17
- Updated react peer dep to > 17
- Updated react peer dep to > 17
- Fix
withLDConsumer
to return children instead of null - Only include dist folder on npm publish
- The .yarn folder is now excluded from the npm registry
- The .yarn folder is now excluded from the npm registry
- Snake case support
- Mock ldClient.alias
- Mock AsyncWithLDProvider now returns a promise