File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -77,13 +77,16 @@ beforeEach(function() {
77
77
fixturesPath = getFixturePath ( '' ) ;
78
78
} ) ;
79
79
80
- function closeWatchers ( ) {
80
+ function closeWatchers ( done ) {
81
81
var u ;
82
82
while ( u = usedWatchers . pop ( ) ) u . close ( ) ;
83
+ if ( done ) {
84
+ process . env . TRAVIS && os === 'darwin' ? setTimeout ( done , 500 ) : done ( ) ;
85
+ }
83
86
}
84
87
function disposeWatcher ( watcher ) {
85
88
if ( ! watcher || ! watcher . close ) return ;
86
- osXFsWatch ? usedWatchers . push ( watcher ) : watcher . close ( ) ;
89
+ os === 'darwin' ? usedWatchers . push ( watcher ) : watcher . close ( ) ;
87
90
}
88
91
afterEach ( function ( ) {
89
92
disposeWatcher ( watcher ) ;
@@ -172,7 +175,7 @@ function runTests(baseopts) {
172
175
waitFor ( [ readySpy ] , function ( ) {
173
176
readySpy . should . have . been . calledOnce ;
174
177
rawSpy = undefined ;
175
- done ( )
178
+ closeWatchers ( done ) ;
176
179
} ) ;
177
180
} ) ;
178
181
it ( 'should produce an instance of chokidar.FSWatcher' , function ( ) {
You can’t perform that action at this time.
0 commit comments