-
-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
split _mocha file #3420
split _mocha file #3420
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/_mocha
file 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/_mocha
code in their own repos.This change separates the
bin/_mocha
file to two files.bin/base.js
file which collects the cli flags and creates a configured mocha instance.bin/_mocha
file which requiresbin/base.js
and runs the exported mocha instance.Advantages:
mocha/bin/base
instead of copy-pasting the code.mocha-watcher
.