This represents the available options to configure Jasmine. Options that are not provided will use their default values.
- Since:
- 3.3.0
- See:
Members
autoCleanClosures :boolean
Clean closures when a suite is done running (done by clearing the stored function reference). This prevents memory leaks, but you won't be able to run jasmine multiple times.
Type:
- boolean
- Since:
- 3.10.0
- Default Value:
- true
detectLateRejectionHandling :Boolean
Whether to detect late promise rejection handling during spec execution. If this option is enabled, a promise rejection that triggers the JavaScript runtime's unhandled rejection event will not be treated as an error as long as it's handled before the spec finishes.
This option is off by default because it imposes a performance penalty.
Type:
- Boolean
- Since:
- 5.10.0
- Default Value:
- false
extraDescribeStackFrames :number
The number of extra stack frames inserted by a wrapper around
describe or by some other local modification. Jasmine uses this
to determine the filename for SpecStartedEvent and
SpecDoneEvent.
Type:
- number
- Since:
- 5.13.0
- Default Value:
- 0
extraItStackFrames :number
The number of extra stack frames inserted by a wrapper around it
or by some other local modification. Jasmine uses this to determine the
filename for SpecStartedEvent and SpecDoneEvent.
Type:
- number
- Since:
- 5.13.0
- Default Value:
- 0
failSpecWithNoExpectations :Boolean
Whether to fail the spec if it ran no expectations. By default a spec that ran no expectations is reported as passed. Setting this to true will report such spec as a failure.
Type:
- Boolean
- Since:
- 3.5.0
- Default Value:
- false
forbidDuplicateNames :boolean
Whether to forbid duplicate spec or suite names. If set to true, using the same name multiple times in the same immediate parent suite is an error.
Type:
- boolean
- Default Value:
- true
hideDisabled :Boolean
Whether reporters should hide disabled specs from their output. Currently only supported by Jasmine's HTMLReporter
Type:
- Boolean
- Since:
- 3.3.0
- Deprecated:
- Yes
- Default Value:
- false
random :Boolean
Whether to randomize spec execution order
Type:
- Boolean
- Since:
- 3.3.0
- Default Value:
- true
safariYieldStrategy :'count'|'time'
The strategy to use in Safari and similar browsers to determine how often to yield control by calling setTimeout. If set to "count", the default, the frequency of setTimeout calls is based on the number of relevant function calls. If set to "time", the frequency of setTimeout calls is based on elapsed time. Using "time" may provide a significant performance improvement, but as of 6.0 it hasn't been tested with a wide variety of workloads and should be considered experimental.
Type:
- 'count' | 'time'
- Since:
- 6.0.0
- Default Value:
- 'count'
seed :number|string
Seed to use as the basis of randomization. Null causes the seed to be determined randomly at the start of execution.
Type:
- number | string
- Since:
- 3.3.0
- Default Value:
- null
specFilter :SpecFilter
Function to use to filter specs
Type:
- Since:
- 3.3.0
- Default Value:
- A function that always returns true.
stopOnSpecFailure :Boolean
Whether to stop execution of the suite after the first spec failure
In parallel mode, `stopOnSpecFailure` works on a "best effort" basis. Jasmine will stop execution as soon as practical after a failure but it might not be immediate.
Type:
- Boolean
- Since:
- 3.9.0
- Default Value:
- false
stopSpecOnExpectationFailure :Boolean
Whether to cause specs to only have one expectation failure.
Type:
- Boolean
- Since:
- 3.3.0
- Default Value:
- false
verboseDeprecations :Boolean
Whether to issue warnings for certain deprecated functionality every time it's used. If not set or set to false, deprecation warnings for methods that tend to be called frequently will be issued only once or otherwise throttled to prevent the suite output from being flooded with warnings.
Type:
- Boolean
- Since:
- 3.6.0
- Default Value:
- false