brittle icon indicating copy to clipboard operation
brittle copied to clipboard

json output

Open davidmarkclements opened this issue 3 years ago • 0 comments

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.

davidmarkclements avatar Apr 05 '22 11:04 davidmarkclements