Class: Env

Env()

The Jasmine environment

Constructor

new Env()

Note: Do not construct this directly, Jasmine will make one during booting.

Since:
  • 2.0.0

Methods

addReporter(reporterToAdd)

Add a custom reporter to the Jasmine environment.

Parameters:
Name Type Description
reporterToAdd Reporter

The reporter to be added.

Since:
  • 2.0.0
See:

clearReporters()

Clear all registered reporters

Since:
  • 2.5.2

configuration() → {Configuration}

Get the current configuration for your jasmine environment

Since:
  • 3.3.0
Returns:
Type
Configuration

configure(configuration)

Configure your jasmine environment

Parameters:
Name Type Description
configuration Configuration
Since:
  • 3.3.0

hideDisabled()

Since:
  • 3.2.0

provideFallbackReporter(reporterToAdd)

Provide a fallback reporter if no other reporters have been specified.

Parameters:
Name Type Description
reporterToAdd Reporter

The reporter

Since:
  • 2.5.0
See:

randomizeTests(value)

Set whether to randomize test execution order

Parameters:
Name Type Description
value Boolean

Whether to randomize execution order

Since:
  • 2.4.0
Deprecated:

seed(value)

Set the random number seed for spec randomization

Parameters:
Name Type Description
value Number

The seed value

Since:
  • 2.4.0
Deprecated:

setSpecProperty(key, value)

Sets a user-defined property that will be provided to reporters as part of the properties field of SpecResult

Parameters:
Name Type Description
key String

The name of the property

value *

The value of the property

Since:
  • 3.6.0

setSuiteProperty(key, value)

Sets a user-defined property that will be provided to reporters as part of the properties field of SuiteResult

Parameters:
Name Type Description
key String

The name of the property

value *

The value of the property

Since:
  • 3.6.0

stopOnSpecFailure(value)

Set whether to stop suite execution when a spec fails

Parameters:
Name Type Description
value Boolean

Whether to stop suite execution when a spec fails

Since:
  • 2.7.0
Deprecated:

throwOnExpectationFailure(value)

Sets whether Jasmine should throw an Error when an expectation fails. This causes a spec to only have one expectation failure.

Parameters:
Name Type Description
value Boolean

Whether to throw when a expectation fails

Since:
  • 2.3.0
Deprecated: