added additional error msg for delayedExpectation

added matching error msgs in jasmine objects

Ran prettier.

removed indenting, formatted column length < 80
This commit is contained in:
Andre Willomitzer
2021-10-07 13:29:45 -04:00
parent 469b557828
commit bb9175cb66
2 changed files with 12 additions and 4 deletions

View File

@@ -2932,7 +2932,9 @@ describe('Env integration', function() {
message: message:
'Spec "a suite does not wait" ran a "toBeResolved" expectation ' + 'Spec "a suite does not wait" ran a "toBeResolved" expectation ' +
'after it finished.\n' + 'after it finished.\n' +
'Did you forget to return or await the result of expectAsync?', '1. Did you forget to return or await the result of expectAsync?\n' +
'2. Was done() invoked before an async operation completed?\n' +
'3. Did an expectation follow a call to done()?',
matcherName: 'toBeResolved' matcherName: 'toBeResolved'
}), }),
jasmine.objectContaining({ jasmine.objectContaining({
@@ -2943,7 +2945,9 @@ describe('Env integration', function() {
'after it finished.\n' + 'after it finished.\n' +
"Message: \"Expected a promise to be resolved to 'something else' " + "Message: \"Expected a promise to be resolved to 'something else' " +
'but it was resolved to undefined."\n' + 'but it was resolved to undefined."\n' +
'Did you forget to return or await the result of expectAsync?', '1. Did you forget to return or await the result of expectAsync?\n' +
'2. Was done() invoked before an async operation completed?\n' +
'3. Did an expectation follow a call to done()?',
matcherName: 'toBeResolvedTo' matcherName: 'toBeResolvedTo'
}) })
]); ]);
@@ -2996,7 +3000,9 @@ describe('Env integration', function() {
message: message:
'Suite "a suite" ran a "toBeResolved" expectation ' + 'Suite "a suite" ran a "toBeResolved" expectation ' +
'after it finished.\n' + 'after it finished.\n' +
'Did you forget to return or await the result of expectAsync?', '1. Did you forget to return or await the result of expectAsync?\n' +
'2. Was done() invoked before an async operation completed?\n' +
'3. Did an expectation follow a call to done()?',
matcherName: 'toBeResolved' matcherName: 'toBeResolved'
}) })
]); ]);

View File

@@ -442,7 +442,9 @@ getJasmineRequireObj().Env = function(j$) {
} }
delayedExpectationResult.message += delayedExpectationResult.message +=
'Did you forget to return or await the result of expectAsync?'; '1. Did you forget to return or await the result of expectAsync?\n' +
'2. Was done() invoked before an async operation completed?\n' +
'3. Did an expectation follow a call to done()?';
topSuite.result.failedExpectations.push(delayedExpectationResult); topSuite.result.failedExpectations.push(delayedExpectationResult);
} }