brittle
brittle copied to clipboard
json output
Output buffering hinders debuggability, particular where chronology is important.
By design nested child output requires reordering (so the subtest asserts go into the correct nested place).
However, nested child tap is useful for representing the assertion structures.
Outputting a JSON structure as the core functionality of brittle can solve for the debugging issues while preserving the prettification aspect of child tests.
The JSON output should be:
- self described
- flat
- time ordered
- without any user objects - e.g. diffs inlined, don't serialize user objects
The JSON output could then be processed to show flat tap output (ala tape) which can be useful in a debugging mode or nested tap output (ala node-tap) to show assertion structure.