Skip to content

Commit

Permalink
Added tests for keep images feature
Browse files Browse the repository at this point in the history
  • Loading branch information
philipptrenz committed Mar 30, 2018
1 parent 9bdaf02 commit b64cf61
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion test/camera.test.coffee
Expand Up @@ -70,7 +70,18 @@ describe "node-gphoto2", ()->

it 'and download it to a buffer', (done)->
@timeout 10000
cameras[0].takePicture download:true, (er, data)->
cameras[0].takePicture download:true, keep:false, (er, data)->
try
should.not.exist er
data.should.be.an.instanceOf Buffer
checkJpegHeader data
done()
catch error
done error

it 'and keep it on camera', (done)->
@timeout 10000
cameras[0].takePicture download:true, keep:true, (er, data)->
try
should.not.exist er
data.should.be.an.instanceOf Buffer
Expand Down

0 comments on commit b64cf61

Please sign in to comment.