mirror of
https://github.com/xuthus83/pigallery2.git
synced 2024-11-03 21:04:03 +08:00
Adding face testing for png #99
This commit is contained in:
parent
f1d9fa0933
commit
ffa7840626
28
test/backend/assets/test_png.json
Normal file
28
test/backend/assets/test_png.json
Normal file
@ -0,0 +1,28 @@
|
||||
{
|
||||
"faces": [
|
||||
{
|
||||
"box": {
|
||||
"height": 18,
|
||||
"left": 2.5,
|
||||
"top": 8,
|
||||
"width": 21
|
||||
},
|
||||
"name": "raspberry"
|
||||
},
|
||||
{
|
||||
"box": {
|
||||
"height": 7,
|
||||
"left": 13.5,
|
||||
"top": 0.5,
|
||||
"width": 9
|
||||
},
|
||||
"name": "leaf"
|
||||
}
|
||||
]
|
||||
"fileSize": 4381,
|
||||
"orientation": 1,
|
||||
"size": {
|
||||
"height": 26,
|
||||
"width": 26
|
||||
}
|
||||
}
|
Binary file not shown.
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 4.3 KiB |
@ -8,14 +8,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({
|
||||
fileSize: 2155,
|
||||
orientation: 1,
|
||||
size: {
|
||||
height: 26,
|
||||
width: 26
|
||||
}
|
||||
}));
|
||||
const expected = require(path.join(__dirname, '/../../../assets/test_png.json'));
|
||||
expect(Utils.clone(data)).to.be.deep.equal(expected);
|
||||
});
|
||||
|
||||
it('should load jpg', async () => {
|
||||
|
Loading…
Reference in New Issue
Block a user