-
Notifications
You must be signed in to change notification settings - Fork 181
Closed
Labels
bugBug or defectBug or defectnon issueIssue is not a problem or requires changesIssue is not a problem or requires changes
Description
Ran into this at some point recently as part of asserting with code - it's easy enough to avoid, but could still be useful to clarify which behavior is correct:
✔ ~/devel/projects/tmp
15:08 $ nvm use 6
Now using node v6.11.2 (npm v5.4.2)
✔ ~/devel/projects/tmp
15:08 $ node
> require('hoek').deepEqual(new Error(), new Error())
true
vs
✔ ~/devel/projects/tmp
15:08 $ nvm use 8
Now using node v8.5.0 (npm v5.4.2)
✔ ~/devel/projects/tmp
15:09 $ node
> require('hoek').deepEqual(new Error(), new Error())
false
It seems that in node 8 property descriptor for error.stack no longer has a get function, but rather has a value - which forces a different path - and the stack is different for the two errors, so possibly the previous behavior was incorrect?
AdriVanHoudt
Metadata
Metadata
Assignees
Labels
bugBug or defectBug or defectnon issueIssue is not a problem or requires changesIssue is not a problem or requires changes