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,
- id: 555,
}
],
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,
- id: 555,
}
],
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?
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:
❌ Test name
... Skipped lines { thing: { + id: 111, - id: 222, prop1: 'aaa', prop2: 'bbb' }, prop3: 'ccc', prop4: 'ddd', ... { + id: 333, - id: 555, } ], prop5: 'eee', prop6: 'fff', prop7: [It's a bit clumsy, because of the HTML table, but seems to render okay on GitHub. Can you see any drawbacks?