code: function flatten(test) {
        return {
          title: test.title,
          duration: test.duration,
          err: test.err ? Object.assign({}, test.err) : null,
        };
      }
docs: Flatten Mocha's `Test` object into plain JSON.