diff --git a/lib/jasmine-core/jasmine.js b/lib/jasmine-core/jasmine.js index bc24d385..e79fe8f2 100644 --- a/lib/jasmine-core/jasmine.js +++ b/lib/jasmine-core/jasmine.js @@ -1544,7 +1544,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); } @@ -10132,5 +10134,5 @@ getJasmineRequireObj().UserContext = function(j$) { }; getJasmineRequireObj().version = function() { - return '4.0.0-pre.0'; + return '4.0.0-dev'; }; diff --git a/package.json b/package.json index 4f200537..4035265c 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "jasmine-core", "license": "MIT", - "version": "4.0.0-pre.0", + "version": "4.0.0-dev", "repository": { "type": "git", "url": "https://github.com/jasmine/jasmine.git" diff --git a/release_notes/3.10.0.md b/release_notes/3.10.0.md new file mode 100644 index 00000000..4d674c2b --- /dev/null +++ b/release_notes/3.10.0.md @@ -0,0 +1,57 @@ +# Jasmine Core 3.10 Release Notes + +## New features and bug fixes + +* Added support for running Jasmine multiple times + * If the env is configured with `autoCleanClosures: false`, then it can be + executed repeatedly. + * Merges #1934 from @nicojs + * Fixes #1925 + +* Improved error message when an async expectation occurs after the spec + finishes + * Merges #1937 from @AndreWillomitzer + * Fixes #1854 + +* Reject timeout values that are too large for setTimeout + * See #1930 + +* Don't immediately move to the next queueable fn on async error + + This allows assertion failures and other errors that occur after the async + error to be routed to the correct spec/suite. + +* Added a stringContaining asymmetric equality tester + * Fixes #1923. + +* The jasmine-core Ruby gem now prints a deprecation message when loaded unless + the SUPPRESS_JASMINE_DEPRECATION environment variable is set. + + +## Documentation updates + +* Added discussion of max timeout value to jsdocs + * Merges #1931 from @trusktr + +* Added missing @since annotations + +* Improved jsdocs for asymmetric equality testers + +* Added a deprecation notice to the jasmine-core Ruby gem's description + +## Supported environments + +jasmine-core 3.10.0 has been tested in the following environments. + +| Environment | Supported versions | +|-------------------|--------------------| +| Node | 10, 12, 14, 16 | +| Safari | 8-14 | +| Chrome | 94 | +| Firefox | 93, 78, 68 | +| Edge | 94 | +| Internet Explorer | 10, 11 | + +------ + +_Release Notes generated with _[Anchorman](http://github.com/infews/anchorman)_ diff --git a/spec/core/integration/EnvSpec.js b/spec/core/integration/EnvSpec.js index 09d3947d..462893d9 100644 --- a/spec/core/integration/EnvSpec.js +++ b/spec/core/integration/EnvSpec.js @@ -3029,7 +3029,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({ @@ -3040,7 +3042,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' }) ]); @@ -3090,7 +3094,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 b9dfe13c..4ee1eae1 100644 --- a/src/core/Env.js +++ b/src/core/Env.js @@ -381,7 +381,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); }