Earl Versions Save

☕ Ergonomic, modern and type-safe assertion library for TypeScript

[email protected]

3 years ago

Patch Changes

  • f37f7fa: Improve types for rejectsWithOnce and ensure that no unhandled rejection error can be thrown.
  • f37f7fa: Make objectWith work with all kinds of objects, not only with plain objects. This is a breaking change.

[email protected]

3 years ago

Patch Changes

  • c4c75c8: Control.assert type changed from never to void.

  • ceb7d92: Added new validators:

    • toBeA
    • toBeAContainerWith
    • toBeAnArrayOfLength
    • toBeAnArrayWith
    • toBeAnObjectWith

    Added new matchers:

    • expect.arrayOfLength
  • 3335eca: Stop exporting loadMatchers from the main entry point.

  • d99dcee: Add new number validators:

    • toBeGreaterThanOrEqualTo(number)
    • toBeLessThan(number)
    • toBeLessThanOrEqualTo(number)
    • toBeExhausted(number)
  • 3335eca: Replace Partial<PluginConfig> instances with the equivalent PluginConfig.

  • c4c75c8: Added Control.fail.

  • 3335eca: Improve doc comments and function parameter names for the public library exports.

[email protected]

3 years ago

Patch Changes

  • 69c6af3: Add toReferentiallyEqual validator performing referential equality
  • 3f2ebc2: Improve ErrorMatcher description in error strings
  • 3f2ebc2: [Plugin devs] Make control.assert return never not void.

[email protected]

3 years ago

Patch Changes

  • 1ef1ad2: Adds the getControl function which is intended to be used by plugins.

[email protected]

3 years ago

Patch Changes

  • 125c29b: Tweak toHaveBeenCalledExactlyWith input type to properly support arrays
  • 923847b: Made expect.a(Array) return type to be any[] not unknown[] which works well with toEqual

[email protected]

3 years ago

Patch Changes

  • 1eac490: Add toMatchSnapshot validator

v0.1.4

3 years ago

Patch Changes

  • 591dccc: Add readme to the final npm package

v0.1.3

3 years ago

Patch Changes

  • 4964a16: Fix bug in StringMatching matcher that prevented it from matching strings with special characters
  • 1e3951d: Added new matchers: arrayWith, objectWith Improve containerWith to work with multiple values
  • 4964a16: Added experimental plugin API. User guide | Dev guide

Internals

  • 4964a16: Migrated to monorepo.

v0.1.2

3 years ago

Patch Changes

  • 0f490bd: Tweak toBeRejected validator signature to be properly async (return Promise<void>). This was a bug in typings not in behavior.

v0.1.1

3 years ago

0.1.1

Patch Changes

  • ded8b37: Change compilation target to ES2015 to enable running on older node.js versions
  • 42ed317: Added containerWith matcher, allowing to match a iterable containing given value