-
Notifications
You must be signed in to change notification settings - Fork 6
Fix deep object acess #1
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -59,3 +59,5 @@ typings/ | |
# dotenv environment variables file | ||
.env | ||
|
||
# Intellij | ||
.idea |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,7 +17,7 @@ describe('message parser', () => { | |
} | ||
it (`parses ${TOPIC[topic]} messages ${authAction} correctly`, () => { | ||
const result = parse(spec.urp.value)[0] | ||
expect(result.parseError).to.be.undefined | ||
expect(result.parseError).to.be.an('undefined') | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. whats the difference with these out of curiosity? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This one expect(result.parseError).to.be.undefined hides information of an method call in an getter method called when you call an attribute. This might be fine, but on a reviewer perspective I'm not able to predict side effects or able to jump in the method, which is called by accessing the attribute. I'm also not so happy with my one, because it mixes types, which is also a problem. This one was provided as a solution on the documentation of chai in bdd style. On my opinion the best is to switch to the assert methods which are also provided by chai. The isUndefined-method should do what expected. |
||
if (!result.parseError && | ||
(!result.payloadEncoding || result.payloadEncoding === PAYLOAD_ENCODING.JSON) | ||
) { | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this breaks in node 6 sadly
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will review this on the next weekend.