muchi-ts
muchi-ts is an annotation (decorator) based test runner for TypeScript and JavaScript languages.
Installation
-
Install test runner.
- npm:
npm install --save-dev muchi-ts
- yarn:
yarn add --dev muchi-ts
- npm:
-
Install annotation type definition.
- yarn:
yarn add --dev https://github.com/machi1990/muchi-ts-types.git
- npm:
npm install --save-dev https://github.com/machi1990/muchi-ts-types.git
- yarn:
How to use
- To run test files execute the runner with
--tests
or its short form-t
options:muchi-ts --tests <path/to/test/files>
ormuchi --tests <regex-to-test-files->
. - Watch mode is available using the
--watch true
or its short form-w true
options. The default value isfalse
. -
-s time
or its long form--timeOut time
, provides a timeout option of stopping test execution if it depasses the provided time. The passed value represents time in milliseconds. The default value is1000ms
. -
-h
or--help
is for how to use information -
--version
provides the version of the executable.
Coverage
muchi-ts integrates easily with nyc
for coverage reports. Install nyc
from npm (npm install --save-dev nyc
) and run nyc muchi -t <your tests>
to see the coverage reports. See Istanbul for more information on how to generate different formats of coverage reports.
Examples
Some sample tests are available here: https://github.com/machi1990/muchi-ts-samples
Author
Manyanda Chitimbo manyanda.chitimbo@gmail.com