Skip to content

Releases: andywer/deep-assert

v0.3.0

12 Jan 10:51
fd0e525

Choose a tag to compare

Adds the allowAdditionalProps option, thanks to @segphault.

Example

assert.deepEquals(
  {foo: {bar: "baz", extra: true}, extra: true},
  {foo: {bar: "baz"}},
  {allowAdditionalProps: true}
)

Before that option you would have had to add ...any() to the expectation object and its child object(s).

See #1 for details.

v0.2.0

29 Apr 06:35
7d1b4f1

Choose a tag to compare

Comes with one small change only:

deepEquals() now returns true if the check passes (was void before). That makes it much more convenient to use deepEquals() inside a satisfies().

Added an example of how to test recursive data structures to the readme.

v0.1.0 - Initial release

29 Apr 06:32
901daf6

Choose a tag to compare

Comes with all the basics:

  • deepEquals()
  • any()
  • satisfies()
  • user-friendly diffs in the error message