From 7aaf7eaf30a42cbcfa8c0a6959d6efb89d7895c2 Mon Sep 17 00:00:00 2001 From: Steve Gravrock Date: Mon, 2 Sep 2024 10:53:56 -0700 Subject: [PATCH] API reference for reporter capabilities --- lib/jasmine-core/jasmine.js | 26 ++++++++++++++++++++++++++ src/core/reporterEvents.js | 26 ++++++++++++++++++++++++++ 2 files changed, 52 insertions(+) diff --git a/lib/jasmine-core/jasmine.js b/lib/jasmine-core/jasmine.js index cd39aee7..86d6ada7 100644 --- a/lib/jasmine-core/jasmine.js +++ b/lib/jasmine-core/jasmine.js @@ -8056,6 +8056,32 @@ getJasmineRequireObj().ReportDispatcher = function(j$) { }; getJasmineRequireObj().reporterEvents = function() { + /** + * Used to tell Jasmine what optional or uncommonly implemented features + * the reporter supports. If not specified, the defaults described in + * {@link ReporterCapabilities} will apply. + * @name Reporter#reporterCapabilities + * @type ReporterCapabilities | undefined + * @since 5.0 + */ + /** + * Used to tell Jasmine what optional or uncommonly implemented features + * the reporter supports. + * @interface ReporterCapabilities + * @see Reporter#reporterCapabilities + * @since 5.0 + */ + /** + * Indicates whether the reporter supports parallel execution. Jasmine will + * not allow parallel execution unless all reporters that are in use set this + * capability to true. + * @name ReporterCapabilities#parallel + * @type boolean | undefined + * @default false + * @see running_specs_in_parallel + * @since 5.0 + */ + const events = [ /** * `jasmineStarted` is called after all of the specs have been loaded, but just before execution starts. diff --git a/src/core/reporterEvents.js b/src/core/reporterEvents.js index 828e87a6..88efb9b3 100644 --- a/src/core/reporterEvents.js +++ b/src/core/reporterEvents.js @@ -1,4 +1,30 @@ getJasmineRequireObj().reporterEvents = function() { + /** + * Used to tell Jasmine what optional or uncommonly implemented features + * the reporter supports. If not specified, the defaults described in + * {@link ReporterCapabilities} will apply. + * @name Reporter#reporterCapabilities + * @type ReporterCapabilities | undefined + * @since 5.0 + */ + /** + * Used to tell Jasmine what optional or uncommonly implemented features + * the reporter supports. + * @interface ReporterCapabilities + * @see Reporter#reporterCapabilities + * @since 5.0 + */ + /** + * Indicates whether the reporter supports parallel execution. Jasmine will + * not allow parallel execution unless all reporters that are in use set this + * capability to true. + * @name ReporterCapabilities#parallel + * @type boolean | undefined + * @default false + * @see running_specs_in_parallel + * @since 5.0 + */ + const events = [ /** * `jasmineStarted` is called after all of the specs have been loaded, but just before execution starts.