Browse Source

test(anchor): Update anchor component test (#151)

songjianet 4 năm trước cách đây
mục cha
commit
0800022284
1 tập tin đã thay đổi với 6 bổ sung0 xóa
  1. 6 0
      packages/semi-ui/anchor/__test__/anchor.test.js

+ 6 - 0
packages/semi-ui/anchor/__test__/anchor.test.js

@@ -50,4 +50,10 @@ describe('Anchor', () => {
     expect(wrapper.find('.semi-anchor-link-title-active').length).toEqual(1)
     expect(wrapper.exists('.semi-anchor-link .semi-anchor-link')).toEqual(false);
   });
+
+  it('anchor max height and max width', () => {
+    const wrapper = mountAnchor({maxHeight: 50, maxWidth: 100})
+    expect(wrapper.find('.semi-anchor').instance().style.maxHeight).toBe('50px')
+    expect(wrapper.find('.semi-anchor').instance().style.maxWidth).toBe('100px')
+  })
 });