Mocking rc-motion
Opened this issue · 2 comments
prashantjainlacework commented
We are very badly stuck with testing our UI which is based on AntD. One problem we are facing is the Tree component which uses rc-motion to animate expand and collapse of a tree node.
Appreciate it you can please share a way to jest mock the rc-motion.
vagusX commented
try this?
jest.mock('rc-motion/lib/util/motion', () => {
return {
...jest.requireActual('rc-motion/lib/util/motion'),
supportTransition: false,
};
});
edisonLzy commented
try this?
jest.mock('rc-motion/lib/util/motion', () => { return { ...jest.requireActual('rc-motion/lib/util/motion'), supportTransition: false, }; });
how to config in vitest ?