Constructor
new Env()
Note: Do not construct this directly, Jasmine will make one during booting.
Methods
addReporter(reporterToAdd)
Add a custom reporter to the Jasmine environment.
Parameters:
Name | Type | Description |
---|---|---|
reporterToAdd |
Reporter | The reporter to be added. |
- See:
clearReporters()
Clear all registered reporters
configuration() → {Configuration}
Get the current configuration for your jasmine environment
Returns:
- Type
- Configuration
configure(configuration)
Configure your jasmine environment
Parameters:
Name | Type | Description |
---|---|---|
configuration |
Configuration |
hideDisabled()
provideFallbackReporter(reporterToAdd)
Provide a fallback reporter if no other reporters have been specified.
Parameters:
Name | Type | Description |
---|---|---|
reporterToAdd |
Reporter | The reporter |
- See:
randomizeTests(value)
Set whether to randomize test execution order
Parameters:
Name | Type | Description |
---|---|---|
value |
Boolean | Whether to randomize execution order |
- Deprecated:
- Use the `random` option with
Env#configure
- Use the `random` option with
seed(value)
Set the random number seed for spec randomization
Parameters:
Name | Type | Description |
---|---|---|
value |
Number | The seed value |
- Deprecated:
- Use the `seed` option with
Env#configure
- Use the `seed` option with
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 |
- Deprecated:
- Use the `failFast` option with
Env#configure
- Use the `failFast` option with
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 |
- Deprecated:
- Use the `oneFailurePerSpec` option with
Env#configure
- Use the `oneFailurePerSpec` option with