import { render, screen } from '@testing-library/react';
import { Mock } from 'ts-mockery';
import { CreateShortUrl as createShortUrlsCreator } from '../../src/short-urls/CreateShortUrl';
import type { ShortUrlCreation } from '../../src/short-urls/reducers/shortUrlCreation';
import type { Settings } from '../../src/settings/reducers/settings';
describe('', () => {
const ShortUrlForm = () => ShortUrlForm;
const CreateShortUrlResult = () => CreateShortUrlResult;
const shortUrlCreation = { validateUrls: true };
const shortUrlCreationResult = Mock.all();
const createShortUrl = jest.fn(async () => Promise.resolve());
const CreateShortUrl = createShortUrlsCreator(ShortUrlForm, CreateShortUrlResult);
const setUp = () => render(
{}}
settings={Mock.of({ shortUrlCreation })}
/>,
);
it('renders computed initial state', () => {
setUp();
expect(screen.getByText('ShortUrlForm')).toBeInTheDocument();
expect(screen.getByText('CreateShortUrlResult')).toBeInTheDocument();
});
});