Fix flakey test

The assertTask helper needs to be fixed. It has some bad async timing
issues.
This commit is contained in:
Kyle Robinson Young 2016-03-12 13:43:53 -08:00
parent 7606867d0d
commit eea3e094e3

View File

@ -49,7 +49,11 @@ helper.assertTask = function assertTask(task, options) {
// Append a last function to kill spawnGrunt // Append a last function to kill spawnGrunt
runs.push(function() { runs.push(function() {
// TODO: This pattern needs to be fixed. It causes async timing issues.
// each run() function should let it know when its done.
setTimeout(function() {
spawnGrunt.kill('SIGINT'); spawnGrunt.kill('SIGINT');
}, 1000);
}); });
// After watch starts waiting, run our commands then exit // After watch starts waiting, run our commands then exit