mirror of
https://github.com/atom/atom.git
synced 2026-04-06 03:02:13 -04:00
Stop watchers in an afterEach block
This commit is contained in:
@@ -4,6 +4,7 @@ Project = require '../src/project'
|
||||
fs = require 'fs-plus'
|
||||
path = require 'path'
|
||||
{Directory} = require 'pathwatcher'
|
||||
{stopAllWatchers} = require '../src/path-watcher'
|
||||
GitRepository = require '../src/git-repository'
|
||||
|
||||
logToFile = (text) ->
|
||||
@@ -17,13 +18,8 @@ describe "Project", ->
|
||||
waits(1)
|
||||
|
||||
afterEach ->
|
||||
waitsForPromise ->
|
||||
new Promise (resolve, reject) ->
|
||||
temp.cleanup (err) ->
|
||||
if err?
|
||||
reject(err)
|
||||
else
|
||||
resolve()
|
||||
waitsForPromise -> stopAllWatchers()
|
||||
runs -> temp.cleanupSync()
|
||||
|
||||
describe "serialization", ->
|
||||
deserializedProject = null
|
||||
|
||||
Reference in New Issue
Block a user