src/lib/stream.js
/**
 * Prints test suites' name when they begin, and tests' names
 * when they finish. Each test must have a stack property
 * representing its error stack, therefore data must first
 * go through TestSuiteStack stream.
 * data[name]
 * data[type]
 * data[result]
 * data[stack]
 */
Prints test suites' name when they begin, and tests' names
when they finish. Each test must have a stack property
representing its error stack, therefore data must first
go through TestSuiteStack stream.
Prints test suites ' name when they begin and tests ' names when they finish . Each test must have a stack property representing its error stack therefore data must first go through TestSuiteStack stream .
function createProgressTransformStream() {
  const ts = new Transform( ({
    objectMode: true,
    transform({ type, name, stack, result }, encoding, callback) {
      if (type == 'test-suite-start' && name != 'default') {
        this.push(indent(name, getPadding(stack.length)))
        this.push(EOL)
      } else if (type == 'test-end') {
        this.push(indent(result, getPadding(stack.length)))
        this.push(EOL)
      }
      callback()
    },
  }))
  return ts
}
function createProgressTransformStream ( ) { const ts = new Transform ( ( { objectMode : true , transform ( { type , name , stack , result } , encoding , callback ) { if ( type == 'test-suite-start' && name != 'default' ) { this . push ( indent ( name , getPadding ( stack . length ) ) ) this . push ( EOL ) } else if ( type == 'test-end' ) { this . push ( indent ( result , getPadding ( stack . length ) ) ) this . push ( EOL ) } callback ( ) } , } ) ) return ts }
Prints test suites' name when they begin, and tests' names
 when they finish.
Prints test suites ' name when they begin and tests ' names when they finish .
/** @type {!stream.TransformOptions} */