From bb9175cb66eff19038f377318ab50dac088b5c6a Mon Sep 17 00:00:00 2001 From: Andre Willomitzer Date: Thu, 7 Oct 2021 13:29:45 -0400 Subject: [PATCH 1/4] added additional error msg for delayedExpectation added matching error msgs in jasmine objects Ran prettier. removed indenting, formatted column length < 80 --- spec/core/integration/EnvSpec.js | 12 +++++++++--- src/core/Env.js | 4 +++- 2 files changed, 12 insertions(+), 4 deletions(-) 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); } From 896412367a539a41484391340d9ace5b8989b6d3 Mon Sep 17 00:00:00 2001 From: Steve Gravrock Date: Wed, 13 Oct 2021 15:46:21 -0700 Subject: [PATCH 2/4] Bump version to 3.10.0 --- lib/jasmine-core/jasmine.js | 2 +- lib/jasmine-core/version.rb | 2 +- package.json | 2 +- release_notes/3.10.0.md | 44 +++++++++++++++++++++++++++++++++++++ 4 files changed, 47 insertions(+), 3 deletions(-) create mode 100644 release_notes/3.10.0.md diff --git a/lib/jasmine-core/jasmine.js b/lib/jasmine-core/jasmine.js index 3140d7c2..86d7ba37 100644 --- a/lib/jasmine-core/jasmine.js +++ b/lib/jasmine-core/jasmine.js @@ -10111,5 +10111,5 @@ getJasmineRequireObj().UserContext = function(j$) { }; getJasmineRequireObj().version = function() { - return '3.9.0'; + return '3.10.0'; }; diff --git a/lib/jasmine-core/version.rb b/lib/jasmine-core/version.rb index ccee40c5..8d69fe3f 100644 --- a/lib/jasmine-core/version.rb +++ b/lib/jasmine-core/version.rb @@ -4,6 +4,6 @@ # module Jasmine module Core - VERSION = "3.9.0" + VERSION = "3.10.0" end end diff --git a/package.json b/package.json index 84dd9372..c81c63eb 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "jasmine-core", "license": "MIT", - "version": "3.9.0", + "version": "3.10.0", "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..8bc1491a --- /dev/null +++ b/release_notes/3.10.0.md @@ -0,0 +1,44 @@ +# 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 + +------ + +_Release Notes generated with _[Anchorman](http://github.com/infews/anchorman)_ From 572452a15adb7419b406c8573a2399f7eff1d3e2 Mon Sep 17 00:00:00 2001 From: Steve Gravrock Date: Wed, 13 Oct 2021 16:47:48 -0700 Subject: [PATCH 3/4] Added supported environments to 3.10.0 release notes --- release_notes/3.10.0.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/release_notes/3.10.0.md b/release_notes/3.10.0.md index 8bc1491a..4d674c2b 100644 --- a/release_notes/3.10.0.md +++ b/release_notes/3.10.0.md @@ -39,6 +39,19 @@ * 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)_ From 1af0e62ef75174e625c120c9e1d272833a3c94d0 Mon Sep 17 00:00:00 2001 From: Steve Gravrock Date: Thu, 14 Oct 2021 07:06:13 -0700 Subject: [PATCH 4/4] Revert "Revert "Dogfood the new jasmine-npm completion interface"" This reverts commit 4c043717a955ff82e0a9a2ef906715574d0078ca. --- Gruntfile.js | 14 ++++++++++---- package.json | 2 +- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/Gruntfile.js b/Gruntfile.js index 14077d78..e50595cd 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -40,11 +40,17 @@ module.exports = function(grunt) { jasmine = new Jasmine({jasmineCore: jasmineCore}); jasmine.loadConfigFile('./spec/support/jasmine.json'); - jasmine.onComplete(function(passed) { - done(passed); - }); - jasmine.execute(); + jasmine.exitOnCompletion = false; + jasmine.execute().then( + result => { + done(result.overallStatus === 'passed'); + }, + err => { + console.error(err); + exit(1); + } + ); } ); diff --git a/package.json b/package.json index c81c63eb..9e7a620a 100644 --- a/package.json +++ b/package.json @@ -44,7 +44,7 @@ "grunt-contrib-concat": "^1.0.1", "grunt-css-url-embed": "^1.11.1", "grunt-sass": "^3.0.2", - "jasmine": "^3.4.0", + "jasmine": "^3.10.0", "jasmine-browser-runner": "github:jasmine/jasmine-browser#main", "jsdom": "^15.0.0", "load-grunt-tasks": "^4.0.0",