launchdarkly / jest-launchdarkly-mock

Easily unit test LaunchDarkly feature flagged components with jest
Apache License 2.0
25 stars 19 forks source link

[issue-#6] Include flag as is (no case formatting) #7

Closed tboulis closed 2 years ago

tboulis commented 3 years ago

Added optional second parameter to mockFlags() function that is of type:

type mockFlagsOptions = {
  skipFormatting?: boolean
}

If skipFormatting is true, the flags will be mocked without formatting them to camelCase and kebab-case.

Related to https://github.com/launchdarkly-labs/jest-launchdarkly-mock/issues/6

EDIT #1:

Based on code review comment, the original flag is added as-is so the pristine value is returned

yusinto commented 2 years ago

This has been released. Thanks @tboulis