fix(CountDown): should clear timer when destroyed (#4918)
This commit is contained in:
@@ -149,3 +149,16 @@ test('incomplate format prop', () => {
|
||||
|
||||
expect(wrapper).toMatchSnapshot();
|
||||
});
|
||||
|
||||
test('pause when destroyed', async () => {
|
||||
const pause = jest.fn();
|
||||
const wrapper = mount(CountDown, {
|
||||
mocks: {
|
||||
pause
|
||||
}
|
||||
});
|
||||
|
||||
wrapper.destroy();
|
||||
|
||||
expect(wrapper.vm.counting).toBeFalsy();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user