username@email.com
2025-04-27 15eb82df2d6ec539e9d4245bfe08d531e8eb6379
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
describe('minZoomRatio (option)', () => {
  it('should be `0.01` by default', () => {
    const image = window.createImage();
    const viewer = new Viewer(image);
 
    expect(viewer.options.minZoomRatio).to.equal(0.01);
  });
 
  it('should not be less than the given minimum zoom ratio', (done) => {
    const image = window.createImage();
    const minZoomRatio = 0.1;
    const viewer = new Viewer(image, {
      minZoomRatio,
      inline: true,
 
      viewed() {
        viewer.zoomTo(0.01);
        expect(viewer.imageData.ratio).to.equal(minZoomRatio);
        done();
      },
    });
 
    expect(viewer.options.minZoomRatio).to.equal(minZoomRatio);
  });
});