2015-04-26 17:33:05 +00:00
|
|
|
"use strict";
|
|
|
|
|
|
|
|
// Run Node with provided parameters: the first one being the Grunt
|
|
|
|
// done function and latter ones being files to be tested.
|
|
|
|
// See the comment in ../node_smoke_tests.js for more information.
|
2017-09-20 13:32:35 +00:00
|
|
|
module.exports = function spawnTest( done, command ) {
|
|
|
|
var spawn = require( "child_process" ).spawn;
|
2015-04-26 17:33:05 +00:00
|
|
|
|
2017-09-20 13:32:35 +00:00
|
|
|
spawn( command, {
|
|
|
|
stdio: "inherit",
|
|
|
|
shell: true
|
|
|
|
} )
|
2015-04-26 17:33:05 +00:00
|
|
|
.on( "close", function( code ) {
|
|
|
|
done( code === 0 );
|
|
|
|
} );
|
2016-05-10 09:12:28 +00:00
|
|
|
};
|