Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Add support for user-type contract tests. #189

Merged
merged 1 commit into from
Jul 6, 2023

Conversation

kinyoklion
Copy link
Member

This adds support for the user-type capability of the contract tests.

All tests pass.

@@ -90,9 +90,9 @@ export async function newSdkClientEntity(options) {
case 'evaluate': {
const pe = params.evaluate;
if (pe.detail) {
return await client.variationDetail(pe.flagKey, pe.context, pe.defaultValue);
return await client.variationDetail(pe.flagKey, pe.context || pe.user, pe.defaultValue);
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Basically for any request it can pass a user or a context, we handle them interchangeably.

@kinyoklion kinyoklion merged commit eda8371 into main Jul 6, 2023
13 checks passed
@kinyoklion kinyoklion deleted the rlamb/add-usertype-tests branch July 6, 2023 15:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants