Built distribution

This commit is contained in:
Steve Gravrock
2022-06-02 11:37:10 -07:00
parent 4cc8437f79
commit 18a00822c5
+6 -12
View File
@@ -770,8 +770,6 @@ getJasmineRequireObj().Spec = function(j$) {
function() { function() {
return ''; return '';
}; };
this.expectationResultFactory =
attrs.expectationResultFactory || function() {};
this.onLateError = attrs.onLateError || function() {}; this.onLateError = attrs.onLateError || function() {};
this.queueRunnerFactory = attrs.queueRunnerFactory || function() {}; this.queueRunnerFactory = attrs.queueRunnerFactory || function() {};
this.catchingExceptions = this.catchingExceptions =
@@ -818,7 +816,7 @@ getJasmineRequireObj().Spec = function(j$) {
} }
Spec.prototype.addExpectationResult = function(passed, data, isError) { Spec.prototype.addExpectationResult = function(passed, data, isError) {
const expectationResult = this.expectationResultFactory(data); const expectationResult = j$.buildExpectationResult(data);
if (passed) { if (passed) {
this.result.passedExpectations.push(expectationResult); this.result.passedExpectations.push(expectationResult);
} else { } else {
@@ -1023,7 +1021,7 @@ getJasmineRequireObj().Spec = function(j$) {
deprecation = { message: deprecation }; deprecation = { message: deprecation };
} }
this.result.deprecationWarnings.push( this.result.deprecationWarnings.push(
this.expectationResultFactory(deprecation) j$.buildExpectationResult(deprecation)
); );
}; };
@@ -1716,7 +1714,6 @@ getJasmineRequireObj().Env = function(j$) {
description: 'Jasmine__TopLevel__Suite', description: 'Jasmine__TopLevel__Suite',
expectationFactory: expectationFactory, expectationFactory: expectationFactory,
asyncExpectationFactory: suiteAsyncExpectationFactory, asyncExpectationFactory: suiteAsyncExpectationFactory,
expectationResultFactory: j$.buildExpectationResult,
autoCleanClosures: config.autoCleanClosures, autoCleanClosures: config.autoCleanClosures,
onLateError: recordLateError onLateError: recordLateError
}); });
@@ -2175,7 +2172,6 @@ getJasmineRequireObj().Env = function(j$) {
timer: new j$.Timer(), timer: new j$.Timer(),
expectationFactory: expectationFactory, expectationFactory: expectationFactory,
asyncExpectationFactory: suiteAsyncExpectationFactory, asyncExpectationFactory: suiteAsyncExpectationFactory,
expectationResultFactory: j$.buildExpectationResult,
throwOnExpectationFailure: config.stopSpecOnExpectationFailure, throwOnExpectationFailure: config.stopSpecOnExpectationFailure,
autoCleanClosures: config.autoCleanClosures, autoCleanClosures: config.autoCleanClosures,
onLateError: recordLateError onLateError: recordLateError
@@ -2284,7 +2280,6 @@ getJasmineRequireObj().Env = function(j$) {
}, },
onStart: specStarted, onStart: specStarted,
description: description, description: description,
expectationResultFactory: j$.buildExpectationResult,
queueRunnerFactory: queueRunnerFactory, queueRunnerFactory: queueRunnerFactory,
userContext: function() { userContext: function() {
return suite.clonedSharedUserContext(); return suite.clonedSharedUserContext();
@@ -9671,7 +9666,6 @@ getJasmineRequireObj().Suite = function(j$) {
this.description = attrs.description; this.description = attrs.description;
this.expectationFactory = attrs.expectationFactory; this.expectationFactory = attrs.expectationFactory;
this.asyncExpectationFactory = attrs.asyncExpectationFactory; this.asyncExpectationFactory = attrs.asyncExpectationFactory;
this.expectationResultFactory = attrs.expectationResultFactory;
this.throwOnExpectationFailure = !!attrs.throwOnExpectationFailure; this.throwOnExpectationFailure = !!attrs.throwOnExpectationFailure;
this.autoCleanClosures = this.autoCleanClosures =
attrs.autoCleanClosures === undefined ? true : !!attrs.autoCleanClosures; attrs.autoCleanClosures === undefined ? true : !!attrs.autoCleanClosures;
@@ -9856,14 +9850,14 @@ getJasmineRequireObj().Suite = function(j$) {
return; return;
} }
var data = { const data = {
matcherName: '', matcherName: '',
passed: false, passed: false,
expected: '', expected: '',
actual: '', actual: '',
error: arguments[0] error: arguments[0]
}; };
var failedExpectation = this.expectationResultFactory(data); const failedExpectation = j$.buildExpectationResult(data);
if (!this.parentSuite) { if (!this.parentSuite) {
failedExpectation.globalErrorType = 'afterAll'; failedExpectation.globalErrorType = 'afterAll';
@@ -9901,7 +9895,7 @@ getJasmineRequireObj().Suite = function(j$) {
Suite.prototype.addExpectationResult = function() { Suite.prototype.addExpectationResult = function() {
if (isFailure(arguments)) { if (isFailure(arguments)) {
const data = arguments[1]; const data = arguments[1];
const expectationResult = this.expectationResultFactory(data); const expectationResult = j$.buildExpectationResult(data);
if (this.reportedDone) { if (this.reportedDone) {
this.onLateError(expectationResult); this.onLateError(expectationResult);
@@ -9920,7 +9914,7 @@ getJasmineRequireObj().Suite = function(j$) {
deprecation = { message: deprecation }; deprecation = { message: deprecation };
} }
this.result.deprecationWarnings.push( this.result.deprecationWarnings.push(
this.expectationResultFactory(deprecation) j$.buildExpectationResult(deprecation)
); );
}; };