From eea3e094e3193194701932d85826918a5c29a0f3 Mon Sep 17 00:00:00 2001 From: Kyle Robinson Young Date: Sat, 12 Mar 2016 13:43:53 -0800 Subject: [PATCH] Fix flakey test The assertTask helper needs to be fixed. It has some bad async timing issues. --- test/tasks/helper.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/test/tasks/helper.js b/test/tasks/helper.js index 1376bcf..6bdc634 100644 --- a/test/tasks/helper.js +++ b/test/tasks/helper.js @@ -49,7 +49,11 @@ helper.assertTask = function assertTask(task, options) { // Append a last function to kill spawnGrunt runs.push(function() { - spawnGrunt.kill('SIGINT'); + // 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'); + }, 1000); }); // After watch starts waiting, run our commands then exit