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

Interface: Configuration

Configuration

Members

failSpecWithNoExpectations :boolean|undefined

Whether to fail specs that contain no expectations.

Type:
  • boolean | undefined
Default Value:
  • false

helpers :Array.<string>|undefined

An array of helper file paths or globs that match helper files. Each path or glob will be evaluated relative to the spec directory. Helpers are loaded before specs.

Type:
  • Array.<string> | undefined

jsLoader :string|undefined

Specifies how to load files with names ending in .js. Valid values are "require" and "import". "import" should be safe in all cases, and is required if your project contains ES modules with filenames ending in .js.

Type:
  • string | undefined
Default Value:
  • "require"

random :boolean|undefined

Whether to run specs in a random order.

Type:
  • boolean | undefined
Default Value:
  • true

requires :Array.<string>|undefined

An array of module names to load via require() at the start of execution.

Type:
  • Array.<string> | undefined

spec_dir :string|undefined

The directory that spec files are contained in, relative to the project base directory.

Type:
  • string | undefined

spec_files :Array.<string>|undefined

An array of spec file paths or globs that match helper files. Each path or glob will be evaluated relative to the spec directory.

Type:
  • Array.<string> | undefined

stopOnSpecFailure :boolean|undefined

Whether to stop suite execution on the first spec failure.

Type:
  • boolean | undefined
Default Value:
  • false

stopSpecOnExpectationFailure :boolean|undefined

Whether to stop each spec on the first expectation failure.

Type:
  • boolean | undefined
Default Value:
  • false