Mocha migration script from mocha v6 to mocha v7+.
mocha.opts
to .mocharc.{json,js,yml,yaml}
This migration script is based on @wnghdcjfe works.
Using npx:
# mocha.opts to .mocharc.json
npx @azu/mocha-migrate migrate-opts -file ./test/mocha.opts -type json
# mocha.opts to .mocharc.js
npx @azu/mocha-migrate migrate-opts -file ./test/mocha.opts -type js
# mocha.opts to .mocharc.yml
npx @azu/mocha-migrate migrate-opts -file ./test/mocha.opts -type yml
# mocha.opts to .mocharc.yaml
npx @azu/mocha-migrate migrate-opts -file ./test/mocha.opts -type yaml
Global installation:
npm install --global @azu/mocha-migrate
mocha-migrate migrate-opts -file ./test/mocha.opts -type js
Additional features: -rm
remove mocha.opts
after migration
# migrate and remove mocha.opts
npx @azu/mocha-migrate migrate-opts -file ./test/mocha.opts -type json -rm
See Releases page.
Pull requests and stars are always welcome.
For bugs and feature requests, please create an issue.
git checkout -b my-new-feature
git commit -am 'Add some feature'
git push origin my-new-feature
MIT azu
This script includes Mocha and @wnghdcjfe Pull Request.