@volebo/mocha-helpers

Common mocha helpers.

Usage no npm install needed!

<script type="module">
  import voleboMochaHelpers from 'https://cdn.skypack.dev/@volebo/mocha-helpers';
</script>

README

mocha-helpers

Useful tools for mocha in one package


filename2suitename

generates the name for the root test-suite in the file.


'use strict'

describe(filename2suitename(__filename), () => {
    // your tests
})


tags

provided by mocha-tags. provides an ability to filter TESTS by tags

A. use in your test files:

tags(
    'slow',           // describe tags for the root test
    'network',
).describe(filename2suitename(__filename), () => {
    // your tests
})

B. call mocha with filtered tests

mocha --tags "not:slow is:network"

================================================================================

Contributing

You could take part in the development process, just follow this guideline.

License

Please, read the LICENSE file in the root of the repository (or downloaded package).