I've come to the conclusion that we shouldn't have Karma (nor KarmaCoverage) in our 'regular' dependencies after all. By having it there, only the Karma plugins installed in our project are available for use, e.g. KarmaJasmine would be unavailable.
Instead, I have now moved Karma (and KarmaCoverage) to the devDependencies. This does introduce a few issues, however, as we can no longer be sure if and what versions of Karma and KarmaCoverage the user has installed. Luckily, node will show relatively clear error messages when either Karma or KarmaCoverage is not installed, so this is not really an issue. What is an issue, is the fact that we cannot assume that the right version of KarmaCoverage is installed (if you remember, the 0.1.x versions do not allow for complete specification of the path to the coverage file, which is an issue since we need to know that path). To mitigate this, I've introduced a function that will recursively look for the coverage file in the coverage directory, which I have tested and seen working with both v0.1 and v0.2.
In the long term, we should add Karma and KarmaCoverage to the peerDependencies of the project. This way, we can ensure that the user has the right versions of these modules installed next to the grunt-mutation-testing module. For now, it seemed like a bad idea to enforce these modules for all users, as some will only use the project for mutation testing with mocha.
I've come to the conclusion that we shouldn't have Karma (nor KarmaCoverage) in our 'regular' dependencies after all. By having it there, only the Karma plugins installed in our project are available for use, e.g. KarmaJasmine would be unavailable.
Instead, I have now moved Karma (and KarmaCoverage) to the devDependencies. This does introduce a few issues, however, as we can no longer be sure if and what versions of Karma and KarmaCoverage the user has installed. Luckily, node will show relatively clear error messages when either Karma or KarmaCoverage is not installed, so this is not really an issue. What is an issue, is the fact that we cannot assume that the right version of KarmaCoverage is installed (if you remember, the 0.1.x versions do not allow for complete specification of the path to the coverage file, which is an issue since we need to know that path). To mitigate this, I've introduced a function that will recursively look for the coverage file in the coverage directory, which I have tested and seen working with both v0.1 and v0.2.
In the long term, we should add Karma and KarmaCoverage to the peerDependencies of the project. This way, we can ensure that the user has the right versions of these modules installed next to the grunt-mutation-testing module. For now, it seemed like a bad idea to enforce these modules for all users, as some will only use the project for mutation testing with mocha.