Skip to content

Conversation

muffinresearch
Copy link
Contributor

Fixes mozilla/addons#9602

This also means the API for client config now should match node-config.

@coveralls
Copy link

Coverage Status

Coverage remained the same at 100.0% when pulling 0330f96 on muffinresearch:better-client-config into 95dd8c2 on mozilla:master.

const clientConfig = new Map();
export class ClientConfig {
constructor(objData) {
Object.assign(this, {
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 add a comment that this is this way to keep objData private.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sure

Copy link
Contributor

Choose a reason for hiding this comment

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

There's a test which should make it obvious if this gets changed. Although I guess someone might rename objData while they're at it and the test would still pass. Maybe the test should check Object.keys(new ClientConfig({})) === ['get', 'has']?

@muffinresearch muffinresearch force-pushed the better-client-config branch from 0330f96 to 479067f Compare May 11, 2016 15:13
@coveralls
Copy link

Coverage Status

Coverage remained the same at 100.0% when pulling 479067f on muffinresearch:better-client-config into 661c5ab on mozilla:master.

@muffinresearch muffinresearch force-pushed the better-client-config branch from 479067f to 961558a Compare May 11, 2016 15:20
@coveralls
Copy link

Coverage Status

Coverage remained the same at 100.0% when pulling 961558a on muffinresearch:better-client-config into e7b0d33 on mozilla:master.

@mstriemer
Copy link
Contributor

r+

@muffinresearch muffinresearch merged commit ae62247 into mozilla:master May 11, 2016
@muffinresearch muffinresearch deleted the better-client-config branch May 11, 2016 16:23
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.

Blowup with a helpful message on missing keys in client config
3 participants