Console logging during tests messes up formatting
ARAtlas opened this issue · 1 comments
ARAtlas commented
With Mocha for server side tests, tests that log info display nicely. For example:
✓ test 1
✓ test 2
✓ test 3
Some logging
More logging
✓ test 4
More logging
✓ test 5
More logging
✓ test 6
With karma-spec-runner, logging during running tests is unreadable and comes out more like this:
✓ test 1
✓ test 2
✓ test 3 LOG: LOG: Some logging LOG: LOG: More logging ✓ test 4 LOG: LOG: More logging ✓ test 5 LOG: LOG: More logging ✓ test 6
mlex commented
Thx for reporting the bug. The problem lies in the karma code of the base reporter. I tried to fix it by overriding the onBrowserMessage method. To reproduce the bug (and the fix), see mlex/karma-spec-reporter-example@f38876b.