API Docs for:
Show:

WrapSilent Class

Extends Wrap
Defined in: lib/wrap.js:48
Module: tap-wrapper
Prevents node-tap harness from writing output to STDOUT

  • Creates a new stream that returns summary of results in JSON so can access programmatically
  • Good for testing test helpers -> eg used in unit tests for tap-test-helpers module

    so can do fn.Producer.on('end', fn (results))

Constructor

WrapSilent

(
  • test
  • tp
)
Function

Defined in lib/wrap.js:48

Parameters:

  • test Function

    helper function which contains tap.test() function

  • tp AbstractFactory

    instance of tap.Producer stream

Returns:

Function: returns original function bound to new context

Item Index

Properties

Methods

end

(
  • t
)

Defined in lib/wrap.js:101

Handle test end call

Parameters:

  • t Test

    instance of Tap.test

silence

(
  • t
)

Defined in lib/wrap.js:113

Silence the tap.test output to STDOUT by calling t.clear() Save results first and pipe into new tap.Producer stream

Parameters:

  • t Test

    instance of Tap.test

writeStream

(
  • res
)

Defined in lib/wrap.js:127

Pipe the results using the Tap.Producer stream

Parameters:

  • res Object

    JSON obj representing test results

Properties

Factory

AbstractFactory

Defined in lib/wrap.js:72

Factory instance of AbstractFactory class

Producer

Tap.Producer

Defined in lib/wrap.js:79

Producer new instance of tap.Producer

test

Function

Defined in lib/wrap.js:86

test helper function passed as param, now bound to WrapSilent context