Fixed result.pendingReason for specs marked with xit. Closes #1939

This commit is contained in:
Jan Molak
2021-10-22 17:58:31 +01:00
committed by Steve Gravrock
parent 572452a15a
commit 504ef27899
3 changed files with 14 additions and 2 deletions

View File

@@ -991,7 +991,7 @@ x */
if (this.message) {
this.excludeMessage = message;
}
this.pend();
this.pend(message);
};
Spec.prototype.getResult = function() {

View File

@@ -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);

View File

@@ -236,7 +236,7 @@ x */
if (this.message) {
this.excludeMessage = message;
}
this.pend();
this.pend(message);
};
Spec.prototype.getResult = function() {