diff --git a/lib/jasmine-core/jasmine.js b/lib/jasmine-core/jasmine.js index 7e1fa857..3140d7c2 100644 --- a/lib/jasmine-core/jasmine.js +++ b/lib/jasmine-core/jasmine.js @@ -1558,7 +1558,9 @@ getJasmineRequireObj().Env = function(j$) { } 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); } diff --git a/spec/core/integration/EnvSpec.js b/spec/core/integration/EnvSpec.js index b257d085..4df19295 100644 --- a/spec/core/integration/EnvSpec.js +++ b/spec/core/integration/EnvSpec.js @@ -2932,7 +2932,9 @@ describe('Env integration', function() { message: 'Spec "a suite does not wait" ran a "toBeResolved" expectation ' + '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' }), jasmine.objectContaining({ @@ -2943,7 +2945,9 @@ describe('Env integration', function() { 'after it finished.\n' + "Message: \"Expected a promise to be resolved to 'something else' " + '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' }) ]); @@ -2996,7 +3000,9 @@ describe('Env integration', function() { message: 'Suite "a suite" ran a "toBeResolved" expectation ' + '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' }) ]); diff --git a/src/core/Env.js b/src/core/Env.js index c01e23e1..e4e43066 100644 --- a/src/core/Env.js +++ b/src/core/Env.js @@ -442,7 +442,9 @@ getJasmineRequireObj().Env = function(j$) { } 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); }