You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This causes issues where if the flag is not a "valid" kebab-case string or camelCase string, it is not included in the flags set. For example, the flag Client-MyCoolFlag gets converted to client-my-cool-flag and clientMyCoolFlag, neither of which are the original flag.
Recommendation
Also store the original string in the flags set to allow flags that don't conform exactly to camel or kebab casing to be mocked properly.
The text was updated successfully, but these errors were encountered:
Problem
When passing a string to
mockFlags
, it converts the string usinglodash.kebabcase
andlodash.camelcase
, but does not also store the original string:https://github.com/launchdarkly-labs/jest-launchdarkly-mock/blob/4a9f50510c6057f43a54cb1677f99f1b0fe402bf/src/index.ts#L44-L53
This causes issues where if the flag is not a "valid" kebab-case string or camelCase string, it is not included in the flags set. For example, the flag
Client-MyCoolFlag
gets converted toclient-my-cool-flag
andclientMyCoolFlag
, neither of which are the original flag.Recommendation
Also store the original string in the flags set to allow flags that don't conform exactly to camel or kebab casing to be mocked properly.
The text was updated successfully, but these errors were encountered: