Closed yusinto closed 1 year ago
This pull request has been linked to Shortcut Story #207882: Fix openfeature node-server failing unit tests.
@yusinto These do not use gonfalon.
ldClient.variationDetail = jest.fn(async () => ({
value: true,
reason: {
kind: 'OFF',
},
}));
No LD client is made, instead we are just passing specific return values for the methods.
The issue with the test here is the result of an upgrade to the OpenFeature SDK. It now returns extra fields that have been added to the OpenFeature spec.
I also have these changes in the 8.0 upgrade PR, which should be merged this week.
As we are not populating additional information for those fields, I do think it is fine to just ignore them, as both our changes do, for now.
Closing this because the changes were in the V8 upgrade.
It looks like gonfalon may have updated the eval response and nown all unit tests are failing with two additional fields
flagMetadata
andvariant
. I see thatvariant
is part of the open feature spec, butflagMetadata
is not. This pr takes the easy way out and changes the assertion to match a subset of the json response, but I'm not sure if this is the original intent of these tests.