mirror of
https://github.com/cpvalente/ontime.git
synced 2026-08-04 06:58:02 +00:00
c12bca05aa
* chore/tests: install testing libraries * chore/tests: upgrade dependencies * chore/tests: configure linters * chore/tests: add basic component tests * chore/tests: version bump
19 lines
577 B
JavaScript
19 lines
577 B
JavaScript
import { render, screen } from '@testing-library/react';
|
|
import SocketProvider from 'app/context/socketContext';
|
|
import PlaybackControl from '../PlaybackControl';
|
|
|
|
test('check that playback control renders', async () => {
|
|
// need to inject the socket provider to make component
|
|
// render without failing
|
|
render(
|
|
<SocketProvider>
|
|
<PlaybackControl />
|
|
</SocketProvider>
|
|
);
|
|
|
|
// Text labels for times
|
|
// substring match, ignore case
|
|
expect(screen.getByText(/started/i)).toBeInTheDocument();
|
|
expect(screen.getByText(/finish/i)).toBeInTheDocument();
|
|
});
|