From 504ef278990d815b2553d865b44542bc209a8d41 Mon Sep 17 00:00:00 2001 From: Jan Molak <1089173+jan-molak@users.noreply.github.com> Date: Fri, 22 Oct 2021 17:58:31 +0100 Subject: [PATCH 1/2] Fixed result.pendingReason for specs marked with xit. Closes #1939 --- lib/jasmine-core/jasmine.js | 2 +- spec/core/EnvSpec.js | 12 ++++++++++++ src/core/Spec.js | 2 +- 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/lib/jasmine-core/jasmine.js b/lib/jasmine-core/jasmine.js index 86d7ba37..daad6630 100644 --- a/lib/jasmine-core/jasmine.js +++ b/lib/jasmine-core/jasmine.js @@ -991,7 +991,7 @@ x */ if (this.message) { this.excludeMessage = message; } - this.pend(); + this.pend(message); }; Spec.prototype.getResult = function() { diff --git a/spec/core/EnvSpec.js b/spec/core/EnvSpec.js index ffc39aa0..49e7f7e8 100644 --- a/spec/core/EnvSpec.js +++ b/spec/core/EnvSpec.js @@ -274,6 +274,18 @@ describe('Env', function() { expect(excludeSpy).toHaveBeenCalledWith('Temporarily disabled with xit'); }); + it('calls spec.pend with "Temporarily disabled with xit"', function() { + var pendSpy = jasmine.createSpy(); + var realExclude = jasmineUnderTest.Spec.prototype.exclude; + + spyOn(env, 'it').and.returnValue({ + exclude: realExclude, + pend: pendSpy + }); + env.xit('foo', function() {}); + expect(pendSpy).toHaveBeenCalledWith('Temporarily disabled with xit'); + }); + it('throws an error when it receives a non-fn argument', function() { expect(function() { env.xit('undefined arg', null); diff --git a/src/core/Spec.js b/src/core/Spec.js index 1548583a..2241085c 100644 --- a/src/core/Spec.js +++ b/src/core/Spec.js @@ -236,7 +236,7 @@ x */ if (this.message) { this.excludeMessage = message; } - this.pend(); + this.pend(message); }; Spec.prototype.getResult = function() { From e86a7f00a679987aff24ce72996aee72ccd5406e Mon Sep 17 00:00:00 2001 From: Steve Gravrock Date: Fri, 22 Oct 2021 16:07:23 -0700 Subject: [PATCH 2/2] Bump version to 3.10.1 --- lib/jasmine-core/jasmine.js | 2 +- lib/jasmine-core/version.rb | 2 +- package.json | 2 +- release_notes/3.10.1.md | 12 ++++++++++++ 4 files changed, 15 insertions(+), 3 deletions(-) create mode 100644 release_notes/3.10.1.md diff --git a/lib/jasmine-core/jasmine.js b/lib/jasmine-core/jasmine.js index daad6630..2ce7c15f 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.10.0'; + return '3.10.1'; }; diff --git a/lib/jasmine-core/version.rb b/lib/jasmine-core/version.rb index 8d69fe3f..9ec2c1f9 100644 --- a/lib/jasmine-core/version.rb +++ b/lib/jasmine-core/version.rb @@ -4,6 +4,6 @@ # module Jasmine module Core - VERSION = "3.10.0" + VERSION = "3.10.1" end end diff --git a/package.json b/package.json index c81c63eb..6e29e331 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "jasmine-core", "license": "MIT", - "version": "3.10.0", + "version": "3.10.1", "repository": { "type": "git", "url": "https://github.com/jasmine/jasmine.git" diff --git a/release_notes/3.10.1.md b/release_notes/3.10.1.md new file mode 100644 index 00000000..f3f44228 --- /dev/null +++ b/release_notes/3.10.1.md @@ -0,0 +1,12 @@ +# Jasmine Core 3.10.1 Release Notes + +## Bugfixes + +* Fixed missing pendingReason in pending spec results + * Fixes [#1939](https://github.com/jasmine/jasmine/issues/1939) + * Merges [#1940](https://github.com/jasmine/jasmine/pull/1940) from @jan-molak + + +------ + +_Release Notes generated with _[Anchorman](http://github.com/infews/anchorman)_