* feat(assertions): add 'exists' alias (#1225)
* docs(assertions): remove bad `exists` example
* test(assertions): add `exists` cases
* test(should): remove `exists` tests from should interface
* feat: adding operator attribute to assertion error
You can set the operator as mentioned below.
flag(this, 'operator', MYOPERATOR).
for example,
flag(obj, 'operator', 'notEqual')
* property assertion should only accept strings if nested, fixes#1043
* similar logic seperated out
* test cases for fix#1043
* type check if not isNested with tests
* Tests for assert and should inteface
* Error message change
* changes in should and assert tests as per review
* assert tests modified
* Review comments changes
* review comments fixes
Previously, the `.property` assertion failed ungracefully if the target was `null` or `undefined`. This commit causes an `AssertionError` to be thrown instead so that the ssfi flag and custom error messages are respected.
- Make it so that only `AssertionError` is thrown from inside of an
assert interface wrapper function
- Always set `ssfi` to the current function when creating a new
`AssertionError` inside of an assert interface wrapper function
- Always set `ssfi` to the current function when creating a new
`Assertion` inside of an assert interface wrapper function,
and set the `keep_ssfi` flag
- Improve the `globalErr` test helper function to also validate that the
thrown error's stack trace doesn't contain frames from the assert
interface
- Make it so that only `AssertionError` is thrown from inside of an
assertion
- Always pass the current `ssfi` to a `new AssertionError` inside of an
assertion
- Always pass the current `ssfi` to a new `Assertion` inside of an
assertion, and set the `keep_ssfi` flag
- Improve the `globalErr` test helper function to also validate that
the thrown error's stack trace doesn't contain implementation frames
- Allows the `keep_ssfi` flag to be set when creating new Assertion
objects by providing its value as the fourth argument.
- Updates the `transferFlags` util to only transfer `keep_ssfi` when the
`includeAll` argument is set to `true`.
- Updates assertion creation and proxify utils to only set `ssfi` if
`keep_ssfi` isn't set.
- Updates inline docs to reflect expanded usage of `keep_ssfi`.