-
Notifications
You must be signed in to change notification settings - Fork 35
Open
Description
It would be nice if assertion failures used syntax highlighting, to make them easier to read, especially when the output is long (e.g. assert.deepEqual).
The following markdown achieves this without changing the layout:
| Failed Tests |
|---|
❌ Test name... Skipped lines
{
thing: {
+ id: 111,
- id: 222,
prop1: 'aaa',
prop2: 'bbb'
},
prop3: 'ccc',
prop4: 'ddd',
...
{
+ id: 333,
+ rrp: 444
- id: 555,
- rrp: 666
}
],
prop5: 'eee',
prop6: 'fff',
prop7: [ |
<table>
<thead>
<tr>
<th>Failed Tests</th>
</tr>
</thead>
<tbody>
<tr>
<td>
<details>
<summary>❌ Test name</summary>
```diff
... Skipped lines
{
thing: {
+ id: 111,
- id: 222,
prop1: 'aaa',
prop2: 'bbb'
},
prop3: 'ccc',
prop4: 'ddd',
...
{
+ id: 333,
+ rrp: 444
- id: 555,
- rrp: 666
}
],
prop5: 'eee',
prop6: 'fff',
prop7: [
```
</details>
</td>
</tr>
</tbody>
</table>It's a bit clumsy, because of the HTML table, but seems to render okay on GitHub. Can you see any drawbacks?
Metadata
Metadata
Assignees
Labels
No labels