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

Change arguments.callee to prevent exception being thrown when running in strict mode #1

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

gbaker1976
Copy link

Hello! First off, thank you for your work. My team benefits from it every day.

This PR is based on my team's encounter with the error noted in this issue: chaijs#578

I believe this change should be a noop, but I await your feedback. I've tested locally, both running the test suite and integration within my project. Based on the nature of this change and existing tests, I don't think additional tests are needed. The constructor seems to have coverage that should break if this change carried ill effects.

The changes are:

  • Changed arguments.callee to function name 'Assertion' in lib/chai/assertion.js to add compatibility for strict mode.
  • Added 'true' property to lib/chai/core/assertions.js to fix failing test.

Thank you for your consideration of this PR. Please let me know if I should take additional steps to meet your requirements for contribution. I looked for guidelines, but couldn't find any.

… test.

* Changed arguments.callee to function name 'Assertion' in lib/chai/assertion.js to add compatability for strict mode.
@beatfactor
Copy link
Member

Can you give me an example on a scenario where the exception is thrown? And also which failing test are you referring to?

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