Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Fix yargs global pollution #3863
Description of the Change
Yargs exports a global singleton by default. Using it directly will break testing apps using yargs themselves.
I followed the best-practice example in yargs' documentation. One test had to be adjusted slightly, using a separate yargs instance which has been reset: this is what yargs does internally and required, because
Makes mocha compatible with other projects depending on yargs.
If we need access to mocha's yargs instance, we'll have to expose it ourselves, instead of relying on the global one.
I think this should be a bug fix (patch release).