Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
gustavomick opened this issue Jan 31, 2017 · 0 comments
Open

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

gustavomick opened this issue Jan 31, 2017 · 0 comments

Comments

@gustavomick
Copy link
Contributor

gustavomick commented Jan 31, 2017

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant