Skip to content

Releases: JamieMason/expect-more

[email protected]

02 Feb 12:50
Compare
Choose a tag to compare

2.0.0 (2018-06-17)

Bug Fixes

  • jest: export correct typings (0c0bdf8)
  • jest: fix expect().toHandle* regression (12e7cf6)

Features

  • core: update length comparing methods to accept arrays
    (3878699)
  • jest: add asymmetric matchers (71238d5)
  • jest: add toHandle[Missing|Null][branches|leaves|nodes]
    (41302c8), closes
    #5
  • jest: add toSurvive matcher (5763fab)
  • jest: expose library as jest matchers (db74006)
  • jest: generators of incomplete forms of a given shape
    (622fe52)
  • jest: improve fail message for expect().toSurvive()
    (2f4052b)
  • jest: remove expect.walkable and expect().toBeWalkable
    (6e2e2c4)
  • jest: use jest v23's asymmetric matchers (b20d6b2)

BREAKING CHANGES

  • jest: Jest did not previously support custom asymmetric matchers, so expect was decorated from the outside to
    provide this behaviour. Since Jest v23 it is now supported officially.

    As such, the following asymmetric matchers have been renamed:

    expect.after → expect.toBeAfter expect.arrayOfBooleans → expect.toBeArrayOfBooleans expect.arrayOfNumbers →
    expect.toBeArrayOfNumbers expect.arrayOfObjects → expect.toBeArrayOfObjects expect.arrayOfSize → expect.toBeArrayOfSize
    expect.arrayOfStrings → expect.toBeArrayOfStrings expect.before → expect.toBeBefore expect.calculable →
    expect.toBeCalculable expect.divisibleBy → expect.toBeDivisibleBy expect.endingWith → expect.toBeEndingWith
    expect.evenNumber → expect.toBeEvenNumber expect.iso8601 → expect.toBeIso8601 expect.jsonString → expect.toBeJsonString
    expect.longerThan → expect.toBeLongerThan expect.near → expect.toBeNear expect.nonEmptyArray → expect.toBeNonEmptyArray
    expect.nonEmptyObject → expect.toBeNonEmptyObject expect.nonEmptyString → expect.toBeNonEmptyString expect.oddNumber →
    expect.toBeOddNumber expect.sameLengthAs → expect.toBeSameLengthAs expect.shorterThan → expect.toBeShorterThan
    expect.startingWith → expect.toBeStartingWith expect.validDate → expect.toBeValidDate expect.whitespace →
    expect.toBeWhitespace expect.wholeNumber → expect.toBeWholeNumber expect.withinRange → expect.toBeWithinRange
    
  • jest: These matchers replace expect().toSurvive()