API Docs for: 0.9.3
Show:

MochaClient Class

Constructor

MochaClient

()

Methods

_runMocha

(
  • options
  • success
  • failure
)
private

Runs mocha tests, self-contained

Parameters:

Returns:

:

_setupDecorators

(
  • eventReporter
  • decorators
  • decoratorPlugins
)
AbstractClientDecorator[] private

Setup decorator plugins

Parameters:

  • eventReporter EventReporter
  • decorators Object[]
  • decoratorPlugins Object

getDecorator

() AbstractClientDecorator[]

Gets the decorator

getEventReporter

() EventReporter

Gets the event-reporter

Returns:

EventReporter:

getFunctions

() Function[]

Gets a list of functions to execute before the tests Mocha Option:

Returns:

getGlobals

() String[]

Gets the list of defined globals Mocha Option: globals

Returns:

getGrep

() String | Boolean

Gets the test filter Mocha Option: grep

Returns:

getMochaConfiguration

() Object

Gets the mocha configuration Overwrite this function if the mocha configuration is found somewhere else.

Returns:

getOptions

() Object

Gets the options

Returns:

getPaths

() String[]

Gets the path of all tests Mocha Option:

Returns:

getRecursive

() Boolean

Should the test-search be recursive? Mocha Option: recursive

Returns:

getReporter

() String

Gets the reporter Mocha Option: reporter

Returns:

getReportManager

() ReportManager

Gets the report-manager

Returns:

ReportManager:

getRequire

() String[]

List of files to be required before the tests are run Mocha Option: require

Returns:

getSlowThreshold

() Int

Gets the threshold for slow tests Mocha Option: slow

Returns:

Int:

getTimeOut

() Int

Gets the threshold for too slow test-suites Mocha Option: timeout

Returns:

Int:

getUi

() String

Gets the UI interface ('tdd', 'bdd') Mocha Option: ui

Returns:

initialize

()

Initializes the instance

lookupFiles

(
  • currentPath
  • [recursive=false]
)
String[] private

Lookup all files in the path given

Parameters:

Returns:

processAfter

() Promise

Processes the end of the testing environment

Returns:

Promise:

processAfterTest

() Promise

Processes the ending of a test

Returns:

Promise:

processBefore

() Promise

Processes the begin of the testing environment

Returns:

Promise:

processBeforeTest

() Promise

Processes the beginning of a test

Returns:

Promise:

run

(
  • parentId
)
Promise

Inherited from AbstractClient but overwritten in lib/task/client/mocha.js:294

Execute client

Parameters:

Returns:

Promise:

setMochaConfiguration

(
  • options
)

Sets the mocha configuration Overwrite this function if the mocha configuration is found somewhere else.

Parameters:

shouldBail

() Boolean

Should mocha bail on first error? Mocha Option: bail

Returns:

shouldCheckLeaks

() Boolean

Should mocha check for leaks Mocha Option: check-leaks

Returns:

shouldInvert

() Boolean

Should the test sequence inverted? Mocha Option: invert

Returns:

shouldSort

() Boolean

Should tests be sorted after gathering and before executing? Mocha Option: sort

Returns:

useAsyncOnly

() Boolean

Gets the reporter Mocha Option: async-only

Returns:

useColors

() Boolean

Should colors be used in output? Mocha Option: colors

Returns:

useInlineDiffs

() Boolean

Output inline diffs Mocha Option: inline-diffs

Returns:

useTimeOuts

() Boolean

Should time-outs be observed? Mocha Option: [no-]timeouts

Returns: