Skip to content

Commit

Permalink
test: fix cascader test coverage (#33802)
Browse files Browse the repository at this point in the history
  • Loading branch information
MadCcc committed Jan 21, 2022
1 parent 5d2994e commit 9cf0dca
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions components/cascader/__tests__/index.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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(() => {});
Expand Down

0 comments on commit 9cf0dca

Please sign in to comment.