From ea91723b36735b2ce042e4f0dbb26e166cd59b3c Mon Sep 17 00:00:00 2001 From: Ash Wilson Date: Fri, 4 Aug 2017 10:37:41 -0400 Subject: [PATCH] Only deal with watcher stopping in the onDidChangeFiles spec --- spec/project-spec.coffee | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/spec/project-spec.coffee b/spec/project-spec.coffee index aa074bbe2..059208cbd 100644 --- a/spec/project-spec.coffee +++ b/spec/project-spec.coffee @@ -14,10 +14,6 @@ describe "Project", -> # Wait for project's service consumers to be asynchronously added waits(1) - afterEach -> - waitsForPromise -> stopAllWatchers() - runs -> temp.cleanupSync() - describe "serialization", -> deserializedProject = null @@ -585,8 +581,10 @@ describe "Project", -> dirTwo = temp.mkdirSync('atom-spec-project-two') fileThree = path.join(dirTwo, 'file-three.txt') - atom.project.setPaths([dirOne]) + # Ensure that all preexisting watchers are stopped + waitsForPromise -> stopAllWatchers() + runs -> atom.project.setPaths([dirOne]) waitsForPromise -> atom.project.watchersByPath[dirOne].getStartPromise() runs ->