From 82e738cad9afedf532290146d6df0a457ffd6d2d Mon Sep 17 00:00:00 2001 From: kazuya kawaguchi Date: Sat, 1 Apr 2017 19:55:02 +0900 Subject: [PATCH] :zap: improvement(test): add initial cb --- template/test/helpers/wait-for-update.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/template/test/helpers/wait-for-update.js b/template/test/helpers/wait-for-update.js index 07b1a18..74afa0e 100644 --- a/template/test/helpers/wait-for-update.js +++ b/template/test/helpers/wait-for-update.js @@ -69,14 +69,14 @@ function timeout (n) { } // helper for mocha async assertions. -// nextTick().then(() => { +// nextTick(() => { // // Automatically waits for nextTick // }).then(() => { // return a promise or value to skip the wait // }) -function nextTick () { - const jobs = [] +function nextTick (initialCb) { + const jobs = initialCb ? [initialCb] : [] let done const chainer = {