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

expect(..).toThrow(new Meteor.Error(401, '')) fails using phantomjs #110

Open
xpressivecode opened this issue Jan 3, 2014 · 1 comment

Comments

@xpressivecode
Copy link
Contributor

This most likely has nothing to do with RTD, but with phantomjs js engine. But I thought I would at least ask to see if you knew of a work around.

Meteor.user = function(){ return null; }
Meteor.Error = function(error, reason){
    return {
        error: error,
        reason: reason
    };
};

expect(Helper.method).toThrow(new Meteor.Error(401, 'must be logged in'));

fails using phantomjs

passes using chrome

I'll assume that this might be due to phantomjs using an older javascript engine. Any thoughts on getting it to pass? I'd prefer not to have any additional browser windows open, but will continue to use chrome for the time being.

@samhatoum
Copy link
Member

I've not seen this before. What in phantom is failing exactly? Perhaps you could patch that part of the JS engine prior to running your test? a bit of a cheat but it's a rock and a hard place situation :)

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

No branches or pull requests

2 participants