rm deprecated jsApiReporter

This commit is contained in:
Steve Gravrock
2025-11-27 11:22:27 -08:00
parent 876de65803
commit 03006080d4
7 changed files with 0 additions and 458 deletions

View File

@@ -1,133 +0,0 @@
getJasmineRequireObj().JsApiReporter = function(j$) {
'use strict';
// TODO: remove in 7.0.
/**
* @name jsApiReporter
* @classdesc {@link Reporter} added by default in `boot.js` to record results for retrieval in javascript code. An instance is made available as `jsApiReporter` on the global object.
* @class
* @hideconstructor
* @deprecated In most cases jsApiReporter can simply be removed. If necessary, it can be replaced with a {@link Reporter|custom reporter}.
*/
function JsApiReporter(options) {
const timer = options.timer || new j$.Timer();
let status = 'loaded';
this.started = false;
this.finished = false;
this.runDetails = {};
this.jasmineStarted = function() {
this.started = true;
status = 'started';
timer.start();
};
let executionTime;
this.jasmineDone = function(runDetails) {
this.finished = true;
this.runDetails = runDetails;
executionTime = timer.elapsed();
status = 'done';
};
/**
* Get the current status for the Jasmine environment.
* @name jsApiReporter#status
* @since 2.0.0
* @function
* @return {String} - One of `loaded`, `started`, or `done`
*/
this.status = function() {
return status;
};
const suites = [],
suites_hash = {};
this.suiteStarted = function(result) {
suites_hash[result.id] = result;
};
this.suiteDone = function(result) {
storeSuite(result);
};
/**
* Get the results for a set of suites.
*
* Retrievable in slices for easier serialization.
* @name jsApiReporter#suiteResults
* @since 2.1.0
* @function
* @param {Number} index - The position in the suites list to start from.
* @param {Number} length - Maximum number of suite results to return.
* @return {SuiteResult[]}
*/
this.suiteResults = function(index, length) {
return suites.slice(index, index + length);
};
function storeSuite(result) {
suites.push(result);
suites_hash[result.id] = result;
}
/**
* Get all of the suites in a single object, with their `id` as the key.
* @name jsApiReporter#suites
* @since 2.0.0
* @function
* @return {Object} - Map of suite id to {@link SuiteResult}
*/
this.suites = function() {
return suites_hash;
};
const specs = [];
this.specDone = function(result) {
specs.push(result);
};
/**
* Get the results for a set of specs.
*
* Retrievable in slices for easier serialization.
* @name jsApiReporter#specResults
* @since 2.0.0
* @function
* @param {Number} index - The position in the specs list to start from.
* @param {Number} length - Maximum number of specs results to return.
* @return {SpecDoneEvent[]}
*/
this.specResults = function(index, length) {
return specs.slice(index, index + length);
};
/**
* Get all spec results.
* @name jsApiReporter#specs
* @since 2.0.0
* @function
* @return {SpecDoneEvent[]}
*/
this.specs = function() {
return specs;
};
/**
* Get the number of milliseconds it took for the full Jasmine suite to run.
* @name jsApiReporter#executionTime
* @since 2.0.0
* @function
* @return {Number}
*/
this.executionTime = function() {
return executionTime;
};
}
return JsApiReporter;
};

View File

@@ -47,7 +47,6 @@ var getJasmineRequireObj = (function() {
j$.private.Expector = jRequire.Expector(j$);
j$.private.Expectation = jRequire.Expectation(j$);
j$.private.buildExpectationResult = jRequire.buildExpectationResult(j$);
j$.private.JsApiReporter = jRequire.JsApiReporter(j$);
j$.private.makePrettyPrinter = jRequire.makePrettyPrinter(j$);
j$.private.basicPrettyPrinter = j$.private.makePrettyPrinter();
j$.private.MatchersUtil = jRequire.MatchersUtil(j$);

View File

@@ -354,10 +354,6 @@ getJasmineRequireObj().interface = function(jasmine, env) {
return env.spyOnAllFunctions(obj, includeNonEnumerable);
},
jsApiReporter: new jasmine.private.JsApiReporter({
timer: new jasmine.Timer()
}),
/**
* <p>Members of the jasmine global.</p>
* <p>Note: The members of the