import {JasmineConfig} from '@serenity-js/jasmine/lib/adapter'
public interface | source

JasmineConfig

Configuration object that will be passed to the JasmineRunner.

Member Summary

Public Members
public

defaultTimeoutInterval: number | undefined

Sets the global jasmine.DEFAULT_TIMEOUT_INTERVAL, which defines the default number of milliseconds Jasmine will wait for an asynchronous spec to complete.

public

grep: string | RegExp | undefined

Used to exclude any test scenarios which name doesn't match the pattern from the run.

public

helpers: string[] | undefined

A list of paths to helper files that should be loaded and executed before the requires and the specs.

public

invertGrep: boolean | undefined

Inverts 'grep' matches.

public

random: boolean | undefined

Whether or not the tests should be executed in a pseudo-random order.

public

reporters: JasmineReporter[] | undefined

A list of Jasmine reporters to be added to the test runner.

public

requires: string[] | undefined

A list of paths to files that should be required after the helpers, but before the specs.

public

seed: string | undefined

The randomisation seed that will be used to determine the pseudo-random order of execution, if random is set to true

public

specFilter: function(specName: string): boolean

Receives the full name of a test scenario and returns true for those that should be executed.

Public Members

public defaultTimeoutInterval: number | undefined source

Sets the global jasmine.DEFAULT_TIMEOUT_INTERVAL, which defines the default number of milliseconds Jasmine will wait for an asynchronous spec to complete.

public grep: string | RegExp | undefined source

Used to exclude any test scenarios which name doesn't match the pattern from the run.

public helpers: string[] | undefined source

A list of paths to helper files that should be loaded and executed before the requires and the specs. Accepts relative and absolute paths as well as glob expressions.

public invertGrep: boolean | undefined source

Inverts 'grep' matches.

Defaults to false

public random: boolean | undefined source

Whether or not the tests should be executed in a pseudo-random order.

public reporters: JasmineReporter[] | undefined source

A list of Jasmine reporters to be added to the test runner.

Useful for situations like configuring ReportPortal, because you cannot use jasmine.addReporter() in the Protractor config.

Note: reporters must be instantiated before adding them to the configuration.

Examples:

Using ReportPortal with Protractor and Jasmine
 // protractor.conf.js
 const AgentJasmine = require('@reportportal/agent-js-jasmine')
 const agent = new AgentJasmine(require('./reportportalConf'))
 // ...
 jasmineNodeOpts: {
   // ...
   reporters: [ agent.getJasmineReporter() ],
 }

 afterLaunch:() => {
   return agent.getExitPromise();
 },

public requires: string[] | undefined source

A list of paths to files that should be required after the helpers, but before the specs. The path need to be compatible with Node require.

public seed: string | undefined source

The randomisation seed that will be used to determine the pseudo-random order of execution, if random is set to true

public specFilter: function(specName: string): boolean source

Receives the full name of a test scenario and returns true for those that should be executed.

Takes precedence over grep