javascript-testing-best-practices
javascript-testing-best-practices copied to clipboard
Section 1.1 example code should check for true, not false
The second example in section 1.1 says:
expect(result.approved).to.be.false;
It should be:
expect(result.approved).to.be.true;
(I'm guessing you made it false so you could simulate the error output in the next picture.)
Considering the write put this warning:
A deployment just failed, a test named βAdd productβ failed. Does this tell you what exactly is malfunctioning?
I doubt this is an error. The writer is trying to demonstrate the use of good test names and how helpful it is to have them when a test fails.
@BruceWilliams @baruchvlz Welcome π
I think this is indeed a mistake, and as @baruchvlz said it does not make a lot of difference as the example focused on the name of the test. I'm leaving this issue open until I'll fix it
Thank you