Error on strict mode
See original GitHub issueI got this error with the code expect(value).to.be.null
that run on strict mode.
P/s. I’m using chai@3.4.1
installed via npm install chai
.
Issue Analytics
- State:
- Created 8 years ago
- Comments:23 (11 by maintainers)
Top Results From Across the Web
Strict mode - JavaScript - MDN Web Docs
Strict mode changes some previously-accepted mistakes into errors. JavaScript was designed to be easy for novice developers, and sometimes it ...
Read more >JavaScript "use strict" - W3Schools
As an example, in normal JavaScript, mistyping a variable name creates a new global variable. In strict mode, this will throw an error,...
Read more >Solve JavaScript Error before it happens [strict mode] - Atatus
Strict Mode prevents certain actions from being taken and thrown out as errors. It protects you from the most common and egregious aspects ......
Read more >'with' is not allowed in strict mode - JSLint Error Explanations
This error is raised to highlight a fatal JavaScript syntax error. Your code will fail to run in any environment that supports strict...
Read more >Strict mode in JavaScript - GeeksforGeeks
Strict mode eliminates some JavaScript silent errors by changing them to throw errors. Strict mode fixes mistakes that make it difficult for ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hey @lucasfcosta, I’m not sure I understand this. What is exactly the final decision then? I think the
arguments.callee
still should be replaced with:The only thing I wouldn’t include is the
'use strict';
part on the top of every file. This way no bugs would be introduced, everything would still work as expected and lazy people like me could use--use_strict
without any error message.I checked a few things and I think it might be best if the
'use strict';
were not included. http://stackoverflow.com/questions/16871050/inconsistent-scope-of-use-strict-on-different-web-browsers-concerning-argumen The linked jsfiddle fails in Firefox, so if somebody extends chai in some weird way it could cause problems for them.