Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
it('stop() -> kill', done => {
spawn.mockImplementation(() => ({
stdout: {
on() {},
},
stderr: {
on() {},
},
on(value, cb) {
cb();
},
kill() {},
}));
const _options = Object.assign({}, options);
global.process.kill = () => {
done();
};
runNpmScript(_options).stop();