import { create } from 'react-test-renderer'; import VideoControls from './Controls'; test('VideoControls for single digit seconds', () => { const tree = create( {}} onFullscreenChange={() => {}} onPause={() => {}} onPlay={() => {}} onPlayheadDown={() => {}} onPlayheadUp={() => {}} onVolumeChange={() => {}} playing={false} seek={() => {}} volume={0} />, ).toJSON(); expect(tree).toMatchSnapshot(); }); test('VideoControls for double digit seconds', () => { const tree = create( {}} onFullscreenChange={() => {}} onPause={() => {}} onPlay={() => {}} onPlayheadDown={() => {}} onPlayheadUp={() => {}} onVolumeChange={() => {}} playing={false} seek={() => {}} volume={0} />, ).toJSON(); expect(tree).toMatchSnapshot(); }); test('VideoControls for single digit minutes', () => { const tree = create( {}} onFullscreenChange={() => {}} onPause={() => {}} onPlay={() => {}} onPlayheadDown={() => {}} onPlayheadUp={() => {}} onVolumeChange={() => {}} playing={false} seek={() => {}} volume={0} />, ).toJSON(); expect(tree).toMatchSnapshot(); }); test('VideoControls for double digit minutes', () => { const tree = create( {}} onFullscreenChange={() => {}} onPause={() => {}} onPlay={() => {}} onPlayheadDown={() => {}} onPlayheadUp={() => {}} onVolumeChange={() => {}} playing={false} seek={() => {}} volume={0} />, ).toJSON(); expect(tree).toMatchSnapshot(); }); test('VideoControls rounds for partial seconds', () => { const tree = create( {}} onFullscreenChange={() => {}} onPause={() => {}} onPlay={() => {}} onPlayheadDown={() => {}} onPlayheadUp={() => {}} onVolumeChange={() => {}} playing={false} seek={() => {}} volume={0} />, ).toJSON(); expect(tree).toMatchSnapshot(); });