Added a parallel flag to the jasmineStarted reporter event
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
Copyright (c) 2008-2022 Pivotal Labs
|
||||
Copyright (c) 2008-2023 Pivotal Labs
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of this software and associated documentation files (the
|
||||
@@ -8619,11 +8619,15 @@ getJasmineRequireObj().Runner = function(j$) {
|
||||
* @typedef JasmineStartedInfo
|
||||
* @property {Int} totalSpecsDefined - The total number of specs defined in this suite. Note that this property is not present when Jasmine is run in parallel mode.
|
||||
* @property {Order} order - Information about the ordering (random or not) of this execution of the suite. Note that this property is not present when Jasmine is run in parallel mode.
|
||||
* @property {Boolean} parallel - Whether Jasmine is being run in parallel mode.
|
||||
* @since 2.0.0
|
||||
*/
|
||||
await this.reporter_.jasmineStarted({
|
||||
// In parallel mode, the jasmineStarted event is separately dispatched
|
||||
// by jasmine-npm. This event only reaches reporters in non-parallel.
|
||||
totalSpecsDefined,
|
||||
order: order
|
||||
order: order,
|
||||
parallel: false
|
||||
});
|
||||
|
||||
this.currentlyExecutingSuites_.push(this.topSuite_);
|
||||
|
||||
@@ -1888,7 +1888,8 @@ describe('Env integration', function() {
|
||||
|
||||
expect(reporter.jasmineStarted).toHaveBeenCalledWith({
|
||||
totalSpecsDefined: 1,
|
||||
order: jasmine.any(jasmineUnderTest.Order)
|
||||
order: jasmine.any(jasmineUnderTest.Order),
|
||||
parallel: false
|
||||
});
|
||||
|
||||
expect(reporter.specDone).toHaveBeenCalledWith(
|
||||
@@ -1922,7 +1923,8 @@ describe('Env integration', function() {
|
||||
|
||||
expect(reporter.jasmineStarted).toHaveBeenCalledWith({
|
||||
totalSpecsDefined: 1,
|
||||
order: jasmine.any(jasmineUnderTest.Order)
|
||||
order: jasmine.any(jasmineUnderTest.Order),
|
||||
parallel: false
|
||||
});
|
||||
|
||||
expect(reporter.specDone).toHaveBeenCalledWith(
|
||||
@@ -1970,7 +1972,8 @@ describe('Env integration', function() {
|
||||
|
||||
expect(reporter.jasmineStarted).toHaveBeenCalledWith({
|
||||
totalSpecsDefined: 5,
|
||||
order: jasmine.any(jasmineUnderTest.Order)
|
||||
order: jasmine.any(jasmineUnderTest.Order),
|
||||
parallel: false
|
||||
});
|
||||
|
||||
expect(reporter.specDone.calls.count()).toBe(5);
|
||||
@@ -2152,7 +2155,8 @@ describe('Env integration', function() {
|
||||
|
||||
expect(reporter.jasmineStarted).toHaveBeenCalledWith({
|
||||
totalSpecsDefined: 1,
|
||||
order: jasmine.any(jasmineUnderTest.Order)
|
||||
order: jasmine.any(jasmineUnderTest.Order),
|
||||
parallel: false
|
||||
});
|
||||
|
||||
expect(reporter.specDone).toHaveBeenCalledWith(
|
||||
|
||||
@@ -129,11 +129,15 @@ getJasmineRequireObj().Runner = function(j$) {
|
||||
* @typedef JasmineStartedInfo
|
||||
* @property {Int} totalSpecsDefined - The total number of specs defined in this suite. Note that this property is not present when Jasmine is run in parallel mode.
|
||||
* @property {Order} order - Information about the ordering (random or not) of this execution of the suite. Note that this property is not present when Jasmine is run in parallel mode.
|
||||
* @property {Boolean} parallel - Whether Jasmine is being run in parallel mode.
|
||||
* @since 2.0.0
|
||||
*/
|
||||
await this.reporter_.jasmineStarted({
|
||||
// In parallel mode, the jasmineStarted event is separately dispatched
|
||||
// by jasmine-npm. This event only reaches reporters in non-parallel.
|
||||
totalSpecsDefined,
|
||||
order: order
|
||||
order: order,
|
||||
parallel: false
|
||||
});
|
||||
|
||||
this.currentlyExecutingSuites_.push(this.topSuite_);
|
||||
|
||||
Reference in New Issue
Block a user