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

Interface: Configuration

Configuration

Members

alwaysListPendingSpecs :boolean|undefined

Whether the default reporter should list pending specs even if there are failures.

Type:
  • boolean | undefined
Default Value:
  • true

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

reporters :Array.<Reporter>|undefined

An array of reporters. Each object in the array will be passed to addReporter.

This provides a middle ground between the --reporter= CLI option and full programmatic usage. Note that because reporters are objects with methods, this option can only be used in JavaScript config files (e.g spec/support/jasmine.js), not JSON.

Type:
  • Array.<Reporter> | undefined
See:

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