unexpected-exif

EXIF data plugin for the Unexpected assertion library (version 7+ required). Uses the exif-parser module to do most of the work.

NPM version Build Status Coverage Status Dependency Status

The image can be specified either as a string (file name) or as a Buffer instance.

return expect('magic-pen-6-colours.jpg', 'to have EXIF data satisfying', {
    tags: {
        XResolution: 72,
        Model: 'iPhone 6'
    }
});
expected
to have EXIF data satisfying { tags: { XResolution: 72, Model'iPhone 6' } }
 
{
  
tags: {
  
ProcessingSoftware'gThumb 3.0.2',
  
Orientation: 1,
  
XResolution: 72,
  
YResolution: 72,
  
ResolutionUnit: 2,
  
ModifyDate'2014:07:13 16:21:04',
  
YCbCrPositioning: 1,
  
ColorSpace: 1,
  
ExifImageWidth: 380,
  
ExifImageHeight: 248,
  
Modelundefined 
//
 
should equal 
'iPhone 6'
},
  
imageSize: { height: 248, width: 380 },
  
thumbnailOffset: 300,
  
thumbnailLength: 2152,
  
thumbnailType: 6,
  
app1Offset: 24
}

Read the documentation.

License

Unexpected-exif is licensed under a standard 3-clause BSD license -- see the LICENSE file for details.

Fork me on GitHub