From 3d19aee29f10a8aa4b131ef7ad0263a9b648ed98 Mon Sep 17 00:00:00 2001 From: Mark Wubben Date: Mon, 8 Feb 2016 14:23:48 +0000 Subject: [PATCH] test: watcher shouldn't crash if ignoreRoot is [] --- test/monitor/match.test.js | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/test/monitor/match.test.js b/test/monitor/match.test.js index 281d18e2..65c5047b 100644 --- a/test/monitor/match.test.js +++ b/test/monitor/match.test.js @@ -342,10 +342,23 @@ describe('match rule parser', function () { describe('watcher', function () { - // afterEach(function () { - // config.reset(); - // watch.resetWatchers(); - // }); + afterEach(function () { + config.reset(); + watch.resetWatchers(); + }); + + it('should not crash if ignoreRoot is an empty array', function (done) { + config.load({ + watch: ['test/fixtures/app.js'], + ignoreRoot: [] + }, function (config) { + return watch.watch() + .then(function () { + done(); + }) + .catch(done) + }) + }); it('should match a dotfile if explicitly asked to', function (done) { config.load({