Documentation Home
This page is for an older version of Jasmine (3.10).
The current stable version of Jasmine is: 5.5. You can also look at the docs for the next release: Edge

Interface: Configuration

Configuration

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

failFast :Boolean

Whether to stop execution of the suite after the first spec failure

Type:
  • Boolean
Since:
  • 3.3.0
Deprecated:
  • Use the `stopOnSpecFailure` config property instead.
Default Value:
  • false

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

hideDisabled :Boolean

Whether or not reporters should hide disabled specs from their output. Currently only supported by Jasmine's HTMLReporter

Type:
  • Boolean
Since:
  • 3.3.0
Default Value:
  • false

oneFailurePerSpec :Boolean

Whether to cause specs to only have one expectation failure.

Type:
  • Boolean
Since:
  • 3.3.0
Deprecated:
  • Use the `stopSpecOnExpectationFailure` config property instead.
Default Value:
  • false

Promise :function

Set to provide a custom promise library that Jasmine will use if it needs to create a promise. If not set, it will default to whatever global Promise library is available (if any).

Type:
  • function
Since:
  • 3.5.0
Default Value:
  • undefined

random :Boolean

Whether to randomize spec execution order

Type:
  • Boolean
Since:
  • 3.3.0
Default Value:
  • true

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

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