1it('button shoould start glowing', () => {
2 const wrapper = mount(<PlayButton media={{ currentTime: 0, duration: 1 }}/>);
3 wrapper.update()
4 jest.runAllTimers();
5 expect(wrapper.state('glow')).toBe(true);
6 });
1it('button shoould start glowing', () => {
2 let clock = sinon.useFakeTimers();
3 const wrapper = mount(<PlayButton media={{ currentTime: 0, duration: 1 }}/>);
4 wrapper.update()
5 clock.tick(3000)
6 expect(wrapper.state('glow')).toBe(true);
7 });