Skip to content
New issue

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

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

Already on GitHub? # to your account

Ensure meta$ properties are able to be updated each request #220

Merged
merged 2 commits into from
Jul 26, 2018

Conversation

tchandler
Copy link
Contributor

No description provided.

@coveralls
Copy link

coveralls commented Jul 25, 2018

Coverage Status

Coverage remained the same at 95.326% when pulling 4de1bc6 on tchandler:fix-meta-update into 9c87c5d on hemerajs:master.

@@ -97,4 +97,59 @@ describe('Metadata', function() {
)
})
})

it('Should be able to update metadata', function(done) {
Copy link
Member

Choose a reason for hiding this comment

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

Could you name it like "Should set metadata context correctly when child call use the same property"

@@ -32,7 +32,7 @@ function onClientPreRequest(context, next) {
context.context$ = pattern.context$ || parentContext.context$

// set metadata by passed pattern or current message context
context.meta$ = Object.assign(pattern.meta$ || {}, context.meta$)
Object.assign(context.meta$, pattern.meta$ || {})
Copy link
Member

Choose a reason for hiding this comment

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

I think Object.assign(context.meta$, pattern.meta$) is fine

@StarpTech StarpTech merged commit 45f8524 into hemerajs:master Jul 26, 2018
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants