As, mocha logs the specs string if the test is successful. for the below test suite,
describe("capitalize", function() {
it("capitalizes single words", function() { /* … */});
it("makes the rest of the string lowercase", function() {
expect(capitalize("javaScript")).to.equal("Javascript");
});
});
firing the npm test command would log the following,
capitalize
✓ capitalizes single words
✓ makes the rest of the string lowercase
2 passing (10ms)
The same when written with jasmine would simply log two green dots denoting that the tests were successful. So, is there any way to achieve the mocha like logs ? As the official docs do not help in this regard !
You can use jasmine-spec-reporter, it is a jasmine reporter that display output this way:
Spec started
first suite
✓ should be ok
✗ should failed
- Expected true to be false.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With