I've noticed in your code that you automatically convert the flags to kebab case and camelcase:
exports.mockFlags = function (flags) {
mockUseFlags.mockImplementation(function () {
var result = {};
Object.keys(flags).forEach(function (k) {
var kebab = lodash_kebabcase_1.default(k);
var camel = lodash_camelcase_1.default(k);
result[kebab] = flags[k];
result[camel] = flags[k];
});
return result;
});
};
We use flags with snake case. Is it possible to either configure this by passing a config object to mockFlags or by mocking the Provider that is returned from asyncWithLDProvider?
Hi @tboulis we have an upcoming release to support snake case so it's coming. I'll update this issue when the release is published. Thank you for your patience.
I've noticed in your code that you automatically convert the flags to kebab case and camelcase:
We use flags with snake case. Is it possible to either configure this by passing a config object to
mockFlags
or by mocking the Provider that is returned fromasyncWithLDProvider
?