var exifStream = require('../exif_stream')
var expect = require('chai').use(require('chai-subset')).expect
var StreamTest = require('streamtest')
describe('fs_lookup', () => {
  StreamTest.versions.forEach(function (version) {
    describe('for ' + version + ' streams', function () {
      it('should analyze file using provided function', (done) => {
        StreamTest[version].fromObjects([{
          file: 'test/data/png'
        }]).pipe(exifStream((path) => Promise.resolve('DUMMY'))).pipe(StreamTest[version].toObjects((error, objects) => {
          expect(objects).to.containSubset([{
            exif: 'DUMMY'
          }])
          done(error)
        }))
      })
    })
  })
})

@@ -672,16 +672,392 @@
      %7D)%0A
+      it('should not pass the message if provided function failed', (done) =%3E %7B%0A        StreamTest%5Bversion%5D.fromObjects(%5B%7B%0A          file: 'test/data/png'%0A        %7D%5D).pipe(exifStream((path) =%3E Promise.reject(new Error()))).pipe(StreamTest%5Bversion%5D.toObjects((error, objects) =%3E %7B%0A          expect(objects).not.to.containSubset(%5B%7B%7D%5D)%0A          done(error)%0A        %7D))%0A      %7D)%0A
     %7D)%0A 

Test for exif stream