Open
Description
🚀 Feature Request
Currently, assertion error messages can be difficult to read, especially when dealing with complex data structures. This hinders debugging and troubleshooting efforts.
For example, the assertion:
expect(message).toHaveLength(0);
Produces the following output:
Expected length: 0
Received length: 1
Received array: [{"criticality": {"level": "NON_BREAKING"}, "message": "Field 'product' was added to object type 'Query'", "meta": {"addedFieldName": "product", "typeName": "Query", "typeType": "object type"}]
This raw output of 'Received array' is not easy to read and can make it time-consuming to identify the root cause of the error.
Proposed Solution:
Introduce a feature to format assertion error messages or format it by default, making them more readable and developer-friendly.
Example
No response
Motivation
Format assertion error messages or format it by default, making them more readable and developer-friendly.