From bda9cddc19275f76167147f3cf4b211595ca903e Mon Sep 17 00:00:00 2001 From: AJ Hsu Date: Tue, 11 Oct 2016 14:52:06 +0800 Subject: [PATCH] Add a testcase for filepaths support --- tests/test.js | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/tests/test.js b/tests/test.js index 6e9b0f9..79c548d 100644 --- a/tests/test.js +++ b/tests/test.js @@ -29,6 +29,28 @@ describe('Giving JPG image binary data to exiftool', function () { }); }); +describe('Giving JPG file path to exiftool', function () { + var response; + + before(function (done) { + exif.metadata(process.cwd() + '/tests/resources/chvrches.jpg', function (err, metadata) { + if (err) + throw err; + else + { + console.log(metadata); + response = metadata; + done(); + } + }); + }); + + it('metadata return should be image metadata', function () { + expect(response).to.have.property('fileType'); + expect(response.fileType).to.equal('JPEG'); + }); +}); + describe('Giving PNG image binary data to exiftool', function () { var response;