Browse Source

test: fix cascader test coverage (#33802)

pull/33794/head
MadCcc 3 years ago
committed by GitHub
parent
commit
9cf0dca8fc
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 6
      components/cascader/__tests__/index.test.js

6
components/cascader/__tests__/index.test.js

@ -475,6 +475,12 @@ describe('Cascader', () => {
expect(onChange).toHaveBeenCalledWith(['Zhejiang', 'Hangzhou', 'West Lake'], expect.anything());
});
it('rtl should work well with placement', () => {
const wrapper = mount(<Cascader options={options} direction="rtl" />);
expect(wrapper.find('Trigger').prop('popupPlacement')).toEqual('bottomRight');
});
describe('legacy props', () => {
it('popupClassName', () => {
const errorSpy = jest.spyOn(console, 'error').mockImplementation(() => {});

Loading…
Cancel
Save