Skip to content

Commit

Permalink
[readme] notLooseEqual(s) is not an alias for notDeepLooseEqual
Browse files Browse the repository at this point in the history
  • Loading branch information
ChALkeR authored and ljharb committed Jul 8, 2024
1 parent 7880dd4 commit c827ac9
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions readme.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -321,8 +321,6 @@ Assert that `actual` and `expected` have the same structure and nested values us

Assert that `actual` and `expected` do not have the same structure and nested values using [node's deepEqual() algorithm](https://github.com/inspect-js/node-deep-equal) with loose comparisons (`==`) on leaf nodes and an optional description of the assertion `msg`.

Aliases: `t.notLooseEqual()`, `t.notLooseEquals()`

## t.throws(fn, expected, msg)

Assert that the function call `fn()` throws an exception. `expected`, if present, must be a `RegExp`, `Function`, or `Object`. The `RegExp` matches the string representation of the exception, as generated by `err.toString()`. For example, if you set `expected` to `/user/`, the test will pass only if the string representation of the exception contains the word `user`. Any other exception will result in a failed test. The `Function` could be the constructor for the Error type thrown, or a predicate function to be called with that exception. `Object` in this case corresponds to a so-called validation object, in which each property is tested for strict deep equality. As an example, see the following two tests--each passes a validation object to `t.throws()` as the second parameter. The first test will pass, because all property values in the actual error object are deeply strictly equal to the property values in the validation object.
Expand Down

0 comments on commit c827ac9

Please sign in to comment.