Skip to content
This repository has been archived by the owner on Dec 28, 2023. It is now read-only.

Redundant Mocha Reporter Node <div id="mocha"></div> #225

Open
chrisbottin opened this issue May 29, 2020 · 1 comment
Open

Redundant Mocha Reporter Node <div id="mocha"></div> #225

chrisbottin opened this issue May 29, 2020 · 1 comment

Comments

@chrisbottin
Copy link

Hi,

I've noticed the node <div id="mocha"></div> is created by this plugin whenever I'm running karma in debug mode and the mocha reporter is set to "spec".

This node is only used by the mocha HTML reporter so ...

Should this code

karma-mocha/src/adapter.js

Lines 122 to 125 in bb5be9b

if (isDebugPage && haveMochaConfig(tc) && tc.config.mocha.reporter) {
createMochaReporterNode()
return tc.config.mocha.reporter
}

be changed to check which reporter is used like this?

if (isDebugPage && haveMochaConfig(tc) && tc.config.mocha.reporter === 'html') {
    createMochaReporterNode()
    return tc.config.mocha.reporter
}
@chrisbottin
Copy link
Author

btw, happy to create a PR for it if the changes are sound.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant