Class: Job

'brixy.tester.Job'~ Job

new Job (nameopt, dialogOnFailure, assertLibopt, comparisonDepthopt)

Job object.

Parameters:
Name Type Attributes Default Description
name string <optional>
'Test job'

Job name.

dialogOnFailure boolean

Shows the report dialog when test fails.

assertLib function | string <optional>
'brixy.tester.It'

Assert library. Accepts a constructor or module name. (optional)

comparisonDepth int <optional>
10

Default comparison depth. (optional)

Properties:
Name Type Description
it Object

Assert library instance. Default is module:'brixy.tester.It'~It.

Source:

Methods

addFailedResult (name, description)

Adds a failed result to the current job section.

Parameters:
Name Type Description
name string
description string
Source:

addResult (result)

Adds a result to the current job section.

Parameters:
Name Type Description
result module:'brixy.tester.Result'~Result
Source:

addSection (nameopt) → {module:'brixy.tester.Section'~Section}

Adds a new job section.

Parameters:
Name Type Attributes Description
name string <optional>
Returns:
Source:

addSkippedResult (name, description)

Adds a skipped result to the current job section.

Parameters:
Name Type Description
name string
description string
Source:

currentSection () → {module:'brixy.tester.Section'~Section}

Gets current job section. Create new section if none exists.

Returns:
Source:

getName () → {string}

Gets job name.

Returns:
  • string
Source:

getStatistics () → {Object}

Counts number of tests, number of failed/skipped tests, job duration.

Returns:
  • Object :
    • {total: int, failed: int, skipped: int, duration: milliseconds}
Source:

onResult (result, actual, expected, depth)

Adds the result to the current job section, shows error if needed. Assert library methods calls it after evaluating a test.

Parameters:
Name Type Description
result module:'brixy.tester.Result'~Result
actual module:'brixy.tester.Result'~Value

Actual tested value.

expected module:'brixy.tester.Result'~Value

Expected value.

depth int

The nesting level of the comparison of the objects.

Source:

passed () → {boolean}

Returns true if job passed.

Returns:
  • boolean
Source:

sectionList () → {Array}

Gets list of all sections.

Returns:
  • Array
Source:

setName (name)

Sets job name.

Parameters:
Name Type Description
name string
Source:

toString () → {string}

Returns a string representation of the object.

Returns:
  • string
Source: