Dominik Hardtke
Dominik Hardtke
Since serializing large objects can sometimes take some time it would be neat if Earl would generate messages lazily, i.e., only if an assertion fails. For example, instead of: https://github.com/l2beat/earl/blob/ea923158550558c46336f0a1038ad522ec62cc43/packages/earl/src/validators/basic/toBeTruthy.ts#L38C1-L45C2...
We are using earl as assertion library for our Angular frontend. If we write an assertion like this: ```typescript const $searchBar = document.getElementById('searchBar'); expect($searchBar).toBeTruthy(); ``` then earl hangs because formatting...
Fixes #292
If I have a MockObject and I want to reset that right now I have to reset each individual MockFn separately. Instead, it would be handy if I could just...
Fixes #290
I would expect reset() to reset a mock's calls as well. Otherwise, I would have to manually empty the calls array before each test.
It would be neat if we could do the following: ```typescript const rejectedWith = await expect(Promise.reject(new CustomError('foo', {myProp: 42, count: 2}))) .toBeRejectedWith(CustomError) as CustomError; expect(rejectedWith.myProp).toEqual(42); expect(rejectedWith.count).toBeGreaterThan(1); ``` The same is...
In chai we can do: ```typescript expect(totalNumberOfUsers, 'Number of users must be above 2').to.be.above(2); ``` I would like to be able to do the same with earl, something like: ```typescript...
I think it is not helpful to shorten arrays or objects and always better to print shortened objects. I also fixed a typo in toHaveSubset's negatedReason. Fixes #284
Hi, first of all: Thanks a lot for all the work you have put into earl. We are currently evaluating if we will switch from chai to it because the...