mocha-migrate

Mocha migration script for mocha v7

MIT License

Downloads
11
Stars
12
Committers
1

@azu/mocha-migrate

Mocha migration script from mocha v6 to mocha v7+.

  • Migrate mocha.opts to .mocharc.{json,js,yml,yaml}

This migration script is based on @wnghdcjfe works.

Usage

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

Changelog

See Releases page.

Contributing

Pull requests and stars are always welcome.

For bugs and feature requests, please create an issue.

  1. Fork it!
  2. Create your feature branch: git checkout -b my-new-feature
  3. Commit your changes: git commit -am 'Add some feature'
  4. Push to the branch: git push origin my-new-feature
  5. Submit a pull request :D

Author

License

MIT azu

This script includes Mocha and @wnghdcjfe Pull Request.