Skip to content
This repository was archived by the owner on Oct 17, 2025. It is now read-only.
This repository was archived by the owner on Oct 17, 2025. It is now read-only.

returning promise.rejected(); is not finishing IT( ) #85

@gustavomick

Description

@gustavomick

could you confirm if there is any workaround to fix this:

when i try this

describe('desc1', () => {
  it('it1', () => {
    return promise.when(true);
  });
});

test complete without problem, but if i try rejecting like this

describe('desc1', () => {
  it('it1', () => {
    return promise.rejected();
  });
});

test freeze until jasmine timeout happen. i think jasminewd internally is executing done.fail but is not enough to finish this IT so test hungs.

this is happening when

jasmine.getEnv().throwOnExpectationFailure(true);

as hot fix tried using then(done,done) but missing errors, so opted disabling throwOnExpectationFailure and wrap expectations inside my own helper. (also with benefit of fixing stack missed by jasmine at expectations.)

think is related to jasmine/jasmine#1213
and this angular/protractor#3234
and this jasmine/jasmine#529
etc (multiples issues associated)

seems a jasmine bug to me but anyway would be very useful if you can create a workaround. thank you.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions