How to kill processes spawned in nightwatch globals.js before: function in the after:function
<p>I am new to nightwatch and node.js and need help on the following.
I spawn a child process in the before function as part of nightwatch set up and wants to kill the process in before function(teardown). How do i do that. I am not sure of using the x.kill. </p>

<pre><code>module.exports = {
    before: function(done) {
        spawn = require('child_process').spawn;
        var x = spawn('./abc');
        done();
    },
    after: function(done) {
        done();
        //how to kill x spawned in before function.
    }
}
</code></pre>