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

Make tests pass with --use_strict #1040

Merged
merged 3 commits into from Sep 6, 2017
Merged

Make tests pass with --use_strict #1040

merged 3 commits into from Sep 6, 2017

Conversation

shvaikalesh
Copy link
Contributor

Closes #1034
Related to chaijs/assertion-error#9

err(function(){
function Thing(){};
var t = new Thing();
Thing.prototype = 1337;
t.should.be.an.instanceof(Thing);
}, expectedError, true);
}, 'The instanceof assertion needs a constructor but function was given.', true);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the message is a bit misleading: TypeError is thrown because rhs.prototype is primitive, type of rhs is OK.

Copy link
Member

@keithamus keithamus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All LGTM 👍 awesome work @shvaikalesh

@keithamus keithamus merged commit dbeae08 into chaijs:master Sep 6, 2017
@astorije
Copy link
Member

astorije commented Sep 6, 2017

Should we add "use strict" at the top of our files then?

@keithamus
Copy link
Member

Not yet - we'll do a push for linting very soon though I think.

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

Successfully merging this pull request may close these issues.

None yet

4 participants