import { render, screen } from '@testing-library/react'; import Video from './Video'; describe('Video loading', () => { beforeEach(() => { window.HTMLMediaElement.prototype.load = () => {}; }); it('Does not load when string src does not change', () => { const props = { onPlay: () => {}, onPlayError: () => {}, aspectRatio: 1, captions: 'https://media.w3.org/2010/05/sintel/captions.vtt', src: 'https://media.w3.org/2010/05/sintel/trailer_hd.mp4', } as const; const { container, rerender } = render(