mirror of
https://github.com/cpvalente/ontime.git
synced 2026-08-13 11:23:50 +00:00
Chore/tests (#73)
* chore/tests: install testing libraries * chore/tests: upgrade dependencies * chore/tests: configure linters * chore/tests: add basic component tests * chore/tests: version bump
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
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();
|
||||
});
|
||||
Reference in New Issue
Block a user