mock-spawn icon indicating copy to clipboard operation
mock-spawn copied to clipboard

Easy to use mock for child_process.spawn

Results 5 mock-spawn issues
Sort by recently updated
recently updated
newest added

I have tests that need to check a function spawning the right commands. However, because multiple tests calling that function, it's hard to rely on `mockSpawn.calls` to know which call...

- Added TypeScript deceleration for the public facing API. - Added TSDoc comments based on the README API section.

Support for `process.unref()`. Returns the process itself for chaining process functions. Correct me if I'm wrong, but I don't think there's any special handling required in the mocked version.

We're trying to use this where I work, and are finding that this runs into a memory leak: (node:3597) Warning: Possible EventEmitter memory leak detected. 11 exit listeners added. Use...

Hi. I found a race condition in `mock-spawn` that affects node 0.8.x users. Consider the following code: ``` js var mockSpawn = require('mock-spawn') , mySpawn = mockSpawn(); mySpawn.setDefault(function(done) { this.stdin.on('data',...