frigate/web/src/components/__tests__/CameraImage.test.jsx

16 lines
497 B
React
Raw Normal View History

import { h } from 'preact';
import * as Hooks from '../../hooks';
import CameraImage from '../CameraImage';
2022-03-06 07:16:31 +03:00
import { render, screen } from 'testing-library';
describe('CameraImage', () => {
beforeEach(() => {
jest.spyOn(Hooks, 'useResizeObserver').mockImplementation(() => [{ width: 0 }]);
});
test('renders an activity indicator while loading', async () => {
render(<CameraImage camera="front" />);
expect(screen.queryByLabelText('Loading…')).toBeInTheDocument();
});
});