Skip to main content

externalJasmineConfig

Configuration object that will be passed to the JasmineRunner.

Learn more

Index

Properties

externaloptionalspecDir

specDir?: string

Spec dir is used as a prefix for all spec files and helpers

externaloptionalhelpers

helpers?: string[]

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.

Learn more

externaloptionalrequires

requires?: string[]

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

externaloptionalrandom

random?: boolean

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

externaloptionalgrep

grep?: string | RegExp

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

externaloptionalinvertGrep

invertGrep?: boolean

Inverts 'grep' matches, defaults to false

externaloptionalspecFilter

specFilter?: (specName: string) => boolean

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

Takes precedence over grep.


Type declaration

    • (specName: string): boolean
    • Parameters

      • externalspecName: string

      Returns boolean

externaloptionalseed

seed?: string

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

externaloptionaldefaultTimeoutInterval

defaultTimeoutInterval?: number

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

Learn more

externaloptionalreporters

reporters?: JasmineReporter[]

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.

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();
},