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

Use non-arrow-function for export #18

Merged
merged 3 commits into from
Nov 30, 2018
Merged

Conversation

quentinvernot
Copy link
Contributor

@quentinvernot quentinvernot commented Nov 28, 2018

Hello,
This is a tiny fix to allow the lib to run in IE11 (did it via karma).

I also found a similar problem when attempting to babelify the code as babel adds a "use strict" to the module, which breaks assertEqual because arguments behaves slightly differently in strict mode. It's also an easy fix, should I do that while I'm at it?

@mesaugat
Copy link
Owner

Hello @quentinvernot, thank you for the pull request.

I also found a similar problem when attempting to babelify the code as babel adds a "use strict" to the module, which breaks assertEqual because arguments behaves slightly differently in strict mode. It's also an easy fix, should I do that while I'm at it?

Yes, you can push that here too. 👍

In strict mode, the elements in `arguments` are not the same ref as the actual arguments used in the function, editing one won't change the other.

[Useful MDN link](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Strict_mode#Making_eval_and_arguments_simpler)
@quentinvernot
Copy link
Contributor Author

Done, took a bit of time to confirm it worked.
It caused a weird issue where, in strict mode, expect(noField).excluding('field').to.deep.equal(withField) would not exclude the field, but inverting withField and noField would work. Seems to be fixed now.

@mesaugat mesaugat merged commit 50e4858 into mesaugat:master Nov 30, 2018
@mesaugat
Copy link
Owner

v1.0.12 published. 🎉

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

Successfully merging this pull request may close these issues.

None yet

2 participants