generated from digirati-labs/fesk-ts
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed issue when getting image services from resources without width/…
…height
- Loading branch information
Showing
3 changed files
with
81 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
import { getImageServices } from '../src'; | ||
|
||
describe('getImageServices', () => { | ||
test('It can work when a resource has no height/width', () => { | ||
expect( | ||
getImageServices({ | ||
id: | ||
'https://api.bl.uk/image/iiif/ark:/81055/vdc_100113995491.0x000001/full/max/0/default.jpg', | ||
type: 'Image', | ||
format: 'image/jpg', | ||
service: [ | ||
{ | ||
protocol: 'http://iiif.io/api/image', | ||
width: 2294, | ||
height: 3004, | ||
tiles: [ | ||
{ | ||
scaleFactors: [1, 2, 4, 8], | ||
width: 256, | ||
}, | ||
], | ||
id: | ||
'https://api.bl.uk/image/iiif/ark:/81055/vdc_100113995491.0x000001', | ||
type: 'ImageService2', | ||
profile: 'level2', | ||
}, | ||
], | ||
}) | ||
).toHaveLength(1); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters