childprocess
Inject script into multiple process when using child_process.fork
.
One of the use case is Multiple Process Code Coverage with istanbul.
Install
$ npm i childprocess
Usage
;;
APIs
inject(cb) / inject(filepath)
Inject script when using child_process.fork
.
The inject script is a function that running in sandbox in every process. that mean you can't use the variable out of the function.
The function should return an array that contains 3 arguments same as fork.
childprocess;
reset()
Use child_process.fork
without injected script.