1.0.2 • Published 6 years ago

himanshu-mocha-parallel-executor v1.0.2

Weekly downloads
-
License
MIT
Repository
-
Last release
6 years ago

mocha-parallel-executor

This module supports executing test in parallel.

Installation

$ npm install -D mocha-parallel-executor

Node.js

const exec = require('mocha-parallel-executor');
exec(); // resolve path automatically

bash

$ npx mocha-p

$ npx mocha-p --file ./test/xxx.js

options

optiondescription
debugbe able to see all logs but don't write specs
timeoutmocha' option. (default:2000ms)
concurrencyIf false were specified, all test cases will be executed in parallel. (default: os.cpus().length)
roottarget repository path. (default: process.env.PWD)
dirtarget test directory (default: ./test)
filea target file
filessome target files
delayto wait next test

extra options for executor

optiondescription
beforeexecute function to edit environment
watchto see mocha json logs
errorto see error logs
afterexecute function to edit result

example

$ git clone https://github.com/suguru03/neo-async.git
$ cd neo-async
$ npm install
$ gulp test
/*
 * 1072 passing (32s)
 */

 $ gulp test:fast // using this module
/*
 * 1072 passing (12s)
 */
1.0.2

6 years ago

1.0.1

6 years ago