1
0
mirror of https://github.com/bpatrik/pigallery2.git synced 2025-12-13 23:56:56 +02:00

Merge pull request #275 from kagahd/issue274

#274 use ExifReader 3.15.0 to avoid overwriting Rating by RatingPercent
This commit is contained in:
Patrik J. Braun
2021-04-26 22:11:02 +02:00
committed by GitHub
6 changed files with 40 additions and 15 deletions

View File

@@ -32,6 +32,12 @@ describe('MetadataLoader', () => {
expect(Utils.clone(data)).to.be.deep.equal(expected);
});
it('should load Rating and not overwrite its value by RatingPercent', async () => {
const data = await MetadataLoader.loadPhotoMetadata(path.join(__dirname, '/../../../assets/two_ratings.jpg'));
const expected = require(path.join(__dirname, '/../../../assets/two_ratings.json'));
expect(Utils.clone(data)).to.be.deep.equal(expected);
});
it('should load jpg 2', async () => {
const data = await MetadataLoader.loadPhotoMetadata(path.join(__dirname, '/../../../assets/old_photo.jpg'));
const expected = require(path.join(__dirname, '/../../../assets/old_photo.json'));