Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Improve tests more.

  • Loading branch information...
commit 67ca4c2697536b804aa0ef8c2c935b521e612465 1 parent 4a192e8
@paulmillr authored
Showing with 6 additions and 7 deletions.
  1. +6 −7 test/chokidar-test.coffee
View
13 test/chokidar-test.coffee
@@ -52,43 +52,42 @@ describe 'chokidar', ->
spy = sinon.spy()
testPath = getFixturePath 'add.txt'
- @watcher.on 'add', (path) =>
- spy()
+ @watcher.on 'add', spy
delay =>
spy.should.not.have.been.called
fs.writeFileSync testPath, 'hello'
delay =>
spy.should.have.been.calledOnce
- fs.unlinkSync testPath
+ spy.should.have.been.calledWith testPath
done()
it 'should emit `change` event when file was changed', (done) ->
spy = sinon.spy()
testPath = getFixturePath 'change.txt'
- @watcher.on 'change', (path) =>
- spy()
+ @watcher.on 'change', spy
delay =>
spy.should.not.have.been.called
fs.writeFileSync testPath, 'c'
delay =>
spy.should.have.been.calledOnce
+ spy.should.have.been.calledWith testPath
done()
it 'should emit `unlink` event when file was removed', (done) ->
spy = sinon.spy()
testPath = getFixturePath 'unlink.txt'
- @watcher.on 'unlink', (path) =>
- spy()
+ @watcher.on 'unlink', spy
delay =>
spy.should.not.have.been.called
fs.unlinkSync testPath
delay =>
spy.should.have.been.calledOnce
+ spy.should.have.been.calledWith testPath
done()
describe 'is-binary', ->
Please sign in to comment.
Something went wrong with that request. Please try again.