RobinTail / express-zod-api

A Typescript library to help you get an API server up and running with I/O schema validation and custom middlewares in minutes.
https://ez.robintail.cz
MIT License
619 stars 30 forks source link

Vitest: Improving comparison of HTTP Errors #2053

Closed RobinTail closed 4 weeks ago

RobinTail commented 4 weeks ago

Problem: expect::toEqual() does not really check other props of Error than message: https://vitest.dev/api/expect.html#toequal

Solution: https://vitest.dev/api/expect.html#expect-addequalitytesters https://jestjs.io/docs/expect#expectaddequalitytesterstesters

Partially reverts https://github.com/RobinTail/express-zod-api/pull/1899

coveralls-official[bot] commented 4 weeks ago

Coverage Status

coverage: 100.0%. remained the same when pulling 90669613a447edd3861505b034ecd10998bf3391 on better-comparators into fd00e6bd1ec8b72d0845241e934afca610834481 on master.