mocha-order-tests

Order your mocha test efficiently.

Usage no npm install needed!

<script type="module">
  import mochaOrderTests from 'https://cdn.skypack.dev/mocha-order-tests';
</script>

README

mocha-order-tests

Order your mocha test efficiently.

Installation

npm i --save-dev mocha-order-tests

Usage

First create a .tests-order.json file at the root of your project to specify the order in which tests should be ran:

[
  "unit/**/*",
  "integration/**/*",
  "acceptance/**/*"
]

Then require the module when launching mocha:

"test": "mocha --require mocha-order-tests"

Your tests will run in the given order.

License

MIT.