-
Notifications
You must be signed in to change notification settings - Fork 95
Plug the usual mocha reporter in debug mode? #20
Comments
Yep, this is possible. You can detect the "debug" by checking That said, the reporter will live in the same document as the actual tests and so if you tests use the DOM, it might conflict with each other; for instance your test might add some div into the body and then expect there is one div (ok, this is stupid, but you know what I mean;-)), then the reporter produces additional divs and so the debug will behave differently than the regular run. Also your tests can destroy the HTML reporter output. So I'm not sure if this is desired/worthy. If it is, it might be better to write an HTML reporter on using Karma's API (rather than Mocha) and then use it independently of Mocha (you could use it even with Jasmine/QUnit, etc..) What do other people think? |
@vojtajina yes I got your point. And it would be indeed better if Karma could propose a generic solution for that. |
It would be great to have this feature 👍 |
I agree this should be included. The whole reason I chose Mocha was for the HTML reporter. In the mean time I am using @maksimr 's plugin karma-mocha-debug, but this should be a default for the karma-mocha plugin. |
I think when we fix this issue. We will can define reporter for debug.html in karma.conf.js like: ...
client: {
mocha: {
reporter: '<reporter>'
}
}
... |
feat: Allow define html reporter on debug page. resolve #20
In debug mode, karma proposes a very-simple in-browser reporter that prints the result in browser console.
Would that be possible to plug the usual Mocha HTML reporter?
The text was updated successfully, but these errors were encountered: