to.be.true and to.be.false do not indicate line number when failing
See original GitHub issueThe following code:
describe('Test feature', function() {
it('should raise line number', function() {
expect(true).to.be.false;
});
});
Yields the failure:
Chrome 42.0.2311 (Mac OS X 10.10.3) Test feature should raise line number FAILED
AssertionError: expected true to be false
This can be difficult to debug where your failure is in a test suite if no line number or file is given.
However, if you run the following code:
describe('Test feature', function() {
it('should raise line number', function() {
expect(true).to.equal(false);
});
});
The line number is reported:
Chrome 42.0.2311 (Mac OS X 10.10.3) Test feature should raise line number FAILED
AssertionError: expected true to be false
at Context.<anonymous> (/test.js:3:27)
Version Information
mocha@2.1.0
karma@0.12.31
karma-chai@0.1.0
karma-mocha@0.1.10
Issue Analytics
- State:
- Created 8 years ago
- Comments:13 (6 by maintainers)
Top Results From Across the Web
Grice's Cooperative Principle - Ling 131 - Topic 12 (session A)
Do not say what you believe to be false. It may seem at first sight that it would be simpler for this maxim...
Read more >Grice's Conversational Maxims: Definition & Examples |
When following this maxim during communication, you should: Only say things you believe to be true. Not say things that you cannot back...
Read more >Grice's Maxims
The maxim of quality, where one tries to be truthful, and does not give information that is false or that is not supported...
Read more >Lying as a Violation of Grice's First Maxim of Quality - jstor
According to the traditional philosophical definition, you lie if and only if you assert what you believe to be false with the intent...
Read more >Practices of Science: False Positives and False Negatives
A false positive is a “false alarm.” A false negative is saying something is false when it is actually true (also called a...
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 @vtsatskin thanks for the issue.
Can you try setting
chai.config.includeStack = true;
and seeing if that fixes the problem?Thanks
The newer version of assertion-error was released. Closing!