l2beat / earl

☕ Ergonomic, modern and type-safe assertion library for TypeScript
https://earl.fun/
MIT License
256 stars 19 forks source link

Add toBeRejectedWith #253

Closed sz-piotr closed 1 year ago

sz-piotr commented 1 year ago

Resolves L2B-1130, L2B-1125

linear[bot] commented 1 year ago
L2B-1130 Remove .async add .toBeRejected and .toBeRejectedWith

Also add a hint to .toThrow

L2B-1125 Improve .toThrow error messages

The function call threw an error and it was an instance of CustomError with message "Some error", but it was expected not to be. Changes into: The function call threw a CustomError with the message 'Some error', but it was expected not to throw this error. And… The promise was rejected with an error and the message did not match "Other error", but it was expected to. changes into: The promise was rejected with a message that did not match 'Other error', but it was expected to match.

vercel[bot] commented 1 year ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
earl-docs ✅ Ready (Inspect) Visit Preview Mar 20, 2023 at 3:41PM (UTC)
changeset-bot[bot] commented 1 year ago

🦋 Changeset detected

Latest commit: bbb0fa50a1f202ae2a51eaf2a0377d797983e685

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package | Name | Type | | ------ | ----- | | earljs | Minor |

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR