Skip to content
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

Merged
merged 8 commits into from
Jan 3, 2017

Commits on Jan 3, 2017

  1. 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.
    meeber committed Jan 3, 2017
    Configuration menu
    Copy the full SHA
    5a1e676 View commit details
    Browse the repository at this point in the history
  2. 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`.
    meeber committed Jan 3, 2017
    Configuration menu
    Copy the full SHA
    78f1808 View commit details
    Browse the repository at this point in the history
  3. 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.
    meeber committed Jan 3, 2017
    Configuration menu
    Copy the full SHA
    96f958c View commit details
    Browse the repository at this point in the history
  4. 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.
    meeber committed Jan 3, 2017
    Configuration menu
    Copy the full SHA
    8fa4f78 View commit details
    Browse the repository at this point in the history
  5. 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.
    meeber committed Jan 3, 2017
    Configuration menu
    Copy the full SHA
    b88e536 View commit details
    Browse the repository at this point in the history
  6. test(includeStack): add should interface

    Only the `expect` interface was being tested for correct stack traces.
    This commit adds identical tests for the `should` interface.
    meeber committed Jan 3, 2017
    Configuration menu
    Copy the full SHA
    bf71196 View commit details
    Browse the repository at this point in the history
  7. 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.
    meeber committed Jan 3, 2017
    Configuration menu
    Copy the full SHA
    82ca613 View commit details
    Browse the repository at this point in the history
  8. 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.
    meeber committed Jan 3, 2017
    Configuration menu
    Copy the full SHA
    0c09836 View commit details
    Browse the repository at this point in the history