-
-
Notifications
You must be signed in to change notification settings - Fork 693
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove proxy frames from stack traces and improve docs/tests #884
Commits on Jan 3, 2017
-
refactor(proxify): move feature detection to util
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.
Configuration menu - View commit details
-
Copy full SHA for 5a1e676 - Browse repository at this point
Copy the full SHA 5a1e676View commit details -
refactor(proxify): use Reflect for property access
The proper way to perform an operation's original behavior from within a proxy trap is by using `Reflect`.
Configuration menu - View commit details
-
Copy full SHA for 78f1808 - Browse repository at this point
Copy the full SHA 78f1808View commit details -
refactor(utils): improve function names
Many of the utility functions had slightly misleading names or no names at all. This commit renames the functions with misleading names and adds names to functions that were missing one.
Configuration menu - View commit details
-
Copy full SHA for 96f958c - Browse repository at this point
Copy the full SHA 96f958cView commit details -
test(includeStack): improve tests
Only a couple of types of assertions were being tested for correct stack traces. This commit cleans up the existing tests and adds tests for the missing assertion types.
Configuration menu - View commit details
-
Copy full SHA for 8fa4f78 - Browse repository at this point
Copy the full SHA 8fa4f78View commit details -
fix: remove proxy frames from stack traces
Proxy-related implementation frames were showing up in the stack traces for failed property assertions. This commit removes them by setting the proxy getter (instead of the property getter) as the starting point to remove all implementation frames.
Configuration menu - View commit details
-
Copy full SHA for b88e536 - Browse repository at this point
Copy the full SHA b88e536View commit details -
test(includeStack): add
should
interfaceOnly the `expect` interface was being tested for correct stack traces. This commit adds identical tests for the `should` interface.
Configuration menu - View commit details
-
Copy full SHA for bf71196 - Browse repository at this point
Copy the full SHA bf71196View commit details -
refactor(ssfi): remove dead code and update docs
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.
Configuration menu - View commit details
-
Copy full SHA for 82ca613 - Browse repository at this point
Copy the full SHA 82ca613View commit details -
refactor(Assertion): small edit and improve docs
- Rename third parameter of Assertion constructor from `stack` to `ssfi` for consistency's sake. - Add documentation to Assertion constructor explaining what the `object`, `message`, and `ssfi` flags are for.
Configuration menu - View commit details
-
Copy full SHA for 0c09836 - Browse repository at this point
Copy the full SHA 0c09836View commit details