Skip to content

fix (audiences): Update project config - no longer expect conditions of audiences in typedAudiences to be strings #182

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

Merged
merged 2 commits into from
Nov 6, 2018

Conversation

mjc1283
Copy link
Contributor

@mjc1283 mjc1283 commented Nov 1, 2018

Summary

Update project config to handle the latest datafile format for 3.0 with typed audience evaluation. conditions properties of objects in typedAudiences will be Arrays, and no longer JSON-Strings.

Test Plan

Updated typed audiences datafile in test data to the latest format. Existing tests should pass - no change in behavior.

@coveralls
Copy link

coveralls commented Nov 1, 2018

Coverage Status

Coverage decreased (-0.001%) to 97.257% when pulling c633fd3 on mcarroll/typed-audiences-conditions-not-strings into f0b45d5 on master.

/*
* Note: conditions of audiences in projectConfig.typedAudiences are not
* expected to be string-encoded as they are in projectConfig.audiences.
*/
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you move this comment three lines up and maybe adapt it as necessary? I'm kinda trained to assume each code comments applies to the statement that follows it, which is not the case here.

I guess something like

fns.forEach(projectConfig.typedAudiences, function(audience) {
  // Comment here
});

would also work but that's weird and might be inefficient. 😕

@mjc1283 mjc1283 force-pushed the mcarroll/typed-audiences-conditions-not-strings branch from 5699263 to c633fd3 Compare November 6, 2018 22:38
@mjc1283
Copy link
Contributor Author

mjc1283 commented Nov 6, 2018

build

@mjc1283 mjc1283 merged commit 4c49bc4 into master Nov 6, 2018
@mjc1283 mjc1283 deleted the mcarroll/typed-audiences-conditions-not-strings branch November 6, 2018 23:00
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.

3 participants