Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Use our own AssertionError class. Now we can track the assertion rather than abusing the operator field. We can also stop depending on `core-assert` once we implement `t.throws()` ourselves. Reserve the `statements` property for power-assert output * Directly create `AssertionError`s, making it easier to specify the varying options * Default the assertion message to an empty string, removing workarounds in the mini and verbose reporters * Improve `t.plan()` assertion errors. Specify 'plan' as the assertion, and use `===` as the operator * Refactor `t.throws()` and `t.notThrows()`, improving readability and fixing #1227 * Move knowledge of when to show output into `serialize-error.js`. It sat kind of awkwardly in `assert.js` * Always try to format errors in mini and verbose reporters, check if actual / expected values are available when formatting * Wrap assertions in `assert.js` for use with the `ExecutionContext` * Only enhance the power-assert assertions, don't use `empower-core` to wrap the others * Remove superfluous `empower-core` 'originalMessage' handling. Our assertions create `AssertionError`s with the correct message * Refactor overloaded `Test#_assert()` method and assertion tracking internals. Note that only `t.throws()` and `notThrows()` are (possibly) asynchronous
- Loading branch information