📜  如何在组件中测试超时确实挂载 - Javascript代码示例

📅  最后修改于: 2022-03-11 15:03:19.102000             🧑  作者: Mango

代码示例2
it('button shoould start glowing', () => {
        const wrapper = mount();
        wrapper.update()
        jest.runAllTimers();
        expect(wrapper.state('glow')).toBe(true);
    });