From baecd8e6dac9705200f234dbcd6e71d7210fc161 Mon Sep 17 00:00:00 2001 From: "Patrik J. Braun" Date: Sat, 22 Dec 2018 01:14:13 +0100 Subject: [PATCH] fixing png test --- backend/model/threading/MetadataLoader.ts | 1 + test/backend/unit/model/threading/MetaDataLoader.spec.ts | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/backend/model/threading/MetadataLoader.ts b/backend/model/threading/MetadataLoader.ts index 16e506e0..abc0849d 100644 --- a/backend/model/threading/MetadataLoader.ts +++ b/backend/model/threading/MetadataLoader.ts @@ -81,6 +81,7 @@ export class MetadataLoader { try { const stat = fs.statSync(fullPath); + console.log(stat); metadata.fileSize = stat.size; metadata.creationDate = stat.ctime.getTime(); } catch (err) { diff --git a/test/backend/unit/model/threading/MetaDataLoader.spec.ts b/test/backend/unit/model/threading/MetaDataLoader.spec.ts index da83d589..a5ddaf57 100644 --- a/test/backend/unit/model/threading/MetaDataLoader.spec.ts +++ b/test/backend/unit/model/threading/MetaDataLoader.spec.ts @@ -7,8 +7,8 @@ describe('MetadataLoader', () => { it('should load png', async () => { const data = await MetadataLoader.loadPhotoMetadata(path.join(__dirname, '/../../assets/test_png.png')); + delete data.creationDate; // creation time for png not supported expect(Utils.clone(data)).to.be.deep.equal(Utils.clone({ - creationDate: 1545435746672, fileSize: 2155, orientation: 1, size: {