Skip to content

Conversation

lahirumaramba
Copy link
Member

  • Add toJSON() method to RemoteConfigTemplateImpl to correctly serialize the JSON object

@lahirumaramba lahirumaramba removed the request for review from hiranya911 April 10, 2020 20:04
@lahirumaramba
Copy link
Member Author

Adding unit tests, please hold the review.

Copy link
Contributor

@hiranya911 hiranya911 left a comment

Choose a reason for hiding this comment

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

Looks good. Just a couple of suggestions.

conditions: this.conditions,
parameters: this.parameters,
parameterGroups: this.parameterGroups,
etag: this.etagInternal,
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we use this.etag here?

Copy link
Member Author

Choose a reason for hiding this comment

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

Good catch! Thanks!

expect(cond.expression).to.equal('device.os == \'ios\'');
expect(cond.tagColor).to.equal(TagColor.BLUE);

expect(JSON.stringify(template)).equals(JSON.stringify(REMOTE_CONFIG_RESPONSE));
Copy link
Contributor

Choose a reason for hiding this comment

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

const parsed = JSON.parse(JSON.stringify(template));
expect(parsed).deep.equal(REMOTE_CONFIG_RESPONSE);

Copy link
Member Author

Choose a reason for hiding this comment

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

Updated!

Copy link
Contributor

@hiranya911 hiranya911 left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@lahirumaramba lahirumaramba merged commit 7b5f92f into remote-config Apr 10, 2020
@lahirumaramba lahirumaramba deleted the lm-remoteconfig-fix-etag branch April 10, 2020 21:28
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