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
26
27
28
29
describe('minHeight (option)', () => {
  it('should be `100` by default', () => {
    const image = window.createImage();
    const viewer = new Viewer(image, {
      inline: true,
    });
 
    expect(viewer.options.minHeight).to.equal(100);
  });
 
  it('should not less than the given minimum height', (done) => {
    const image = window.createImage();
    const minHeight = 180;
 
    image.parentElement.style.height = '90px';
 
    const viewer = new Viewer(image, {
      minHeight,
      inline: true,
 
      viewed() {
        expect(parseFloat(window.getComputedStyle(viewer.viewer).height)).to.equal(minHeight);
        done();
      },
    });
 
    expect(viewer.options.minHeight).to.equal(minHeight);
  });
});