API Docs for: 0.3.0
Show:

HookOptions Class

Defined in: lib/config.js:280
Module: config

Object that returns hook options. Note that istanbul does not provide an option to hook require. This is always done by the cover command.

Constructor

HookOptions

(
  • config
)

Defined in lib/config.js:280

Parameters:

  • config Object

    the hooks part of the config object

Methods

handleSigint

() Boolean

Defined in lib/config.js:309

returns if istanbul needs to add a SIGINT (control-c, usually) handler to save coverage information. Useful for getting code coverage out of processes that run forever and need a SIGINT to terminate.

Returns:

Boolean:

true if SIGINT needs to be hooked to write coverage information

hookRunInContext

() Boolean

Defined in lib/config.js:292

returns if vm.runInThisContext needs to be hooked, in addition to the standard require hooks added by istanbul. This should be true for code that uses RequireJS for example. Used by the cover command.

Returns:

Boolean:

true if vm.runInThisContext needs to be hooked for coverage

postRequireHook

() String

Defined in lib/config.js:299

returns a path to JS file or a dependent module that should be used for post-processing files after they have been required. See the yui-istanbul module for an example of a post-require hook. This particular hook modifies the yui loader when that file is required to add istanbul interceptors. Use by the cover command

Returns:

String:

a path to a JS file or the name of a node module that needs to be used as a require post-processor