Conversation
|
Why the coverage decreased like that? |
|
@outsideris i'm not sure! i added the file to the ignore but still, i'll look into it tomorrow |
|
@outsideris i believe this is related to #2578 since it makes the CLI more usable, since the base file now exports the program and the configured mocha. Anyone that wants to run mocha from their own CLI tool can simply import the base. I would definitely love to merge |
|
I'm going to guess the coverage drop (the Travis PR build shows many tests skipped) is because the I'm not sure why some stuff is in Would prefer |
|
@boneskull the I am +1 for moving these |
|
@Bamieh does this change still apply now we have the separation inside /cli!? |
|
It's likely invalid, but I'd like to know if the refactors around yargs and such solve the problem about wrapping the Mocha CLI... |
|
closed by #3556 |
The change
bin/_mochafile is responsible for both configuring mocha from the cli flags and running mocha. This causes an issue, every tool that wants to add on top of the mocha cli must copy-paste thebin/_mochacode in their own repos.This change separates the
bin/_mochafile to two files.bin/base.jsfile which collects the cli flags and creates a configured mocha instance.bin/_mochafile which requiresbin/base.jsand runs the exported mocha instance.Advantages:
mocha/bin/baseinstead of copy-pasting the code.mocha-watcher.