Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
Remove proxy frames from stack traces and improve docs/tests #884
This PR is intentionally split into a number of commits, each one of which has a description within the commit message.
Highlights of this PR:
Note that this doesn't address #878 regarding extra frames in stack traces when using the
I wasn't really aware of how this whole Stack Trace manipulation worked, so I did a bit of research and I found it to be very interesting.
I made a few comments on the source just to make sure I got it right and added a little consideration to improve the readability of the code regarding the
Awesome job @meeber!
Hi friends, sorry for pinging everyone right after holidays, but I've seen we have many open Pull Requests so I thought it would be a good idea for us to start reviewing and approving in order to avoid accumulating too much work.
Also, can anyone make sure LGTM is working? I remember talking about abandoning it in favor of github's review system. What do you think?
Currently, only one module needs to detect if Chai's proxy protection is enabled. However, upcoming changes will involve performing this detection in other modules as well. This commit moves the detection logic to its own utility module for easy reuse.
The proper way to perform an operation's original behavior from within a proxy trap is by using `Reflect`.
There was some dead code leftover from before `includeStack` was made into a config value (as opposed to existing as a property on the Assertion object). This commit removes that dead code, and adds inline documentation for the remaining stack-related code.