Fix type errors in tests
This commit is contained in:
parent
5d37aa91d4
commit
66bc8ae30e
|
@ -7,18 +7,18 @@ import LandingPageModal from './landing-page-modal';
|
|||
|
||||
describe('<LandingPageModal />', () => {
|
||||
it('successfully renders', () => {
|
||||
render(<LandingPageModal onClose={vi.fn} />);
|
||||
render(<LandingPageModal onClose={() => {}} />);
|
||||
expect(screen.getByTestId('modal')).toBeInTheDocument();
|
||||
});
|
||||
|
||||
it('doesn\'t display the signup button by default', () => {
|
||||
render(<LandingPageModal onClose={vi.fn} />);
|
||||
render(<LandingPageModal onClose={() => {}} />);
|
||||
expect(screen.queryByText('Register')).not.toBeInTheDocument();
|
||||
});
|
||||
|
||||
describe('with registrations enabled', () => {
|
||||
it('displays the signup button', () => {
|
||||
render(<LandingPageModal onClose={vi.fn} />, undefined, storeOpen);
|
||||
render(<LandingPageModal onClose={() => {}} />, undefined, storeOpen);
|
||||
expect(screen.getByText('Register')).toBeInTheDocument();
|
||||
});
|
||||
});
|
||||
|
|
|
@ -7,18 +7,18 @@ import UnauthorizedModal from './unauthorized-modal';
|
|||
|
||||
describe('<UnauthorizedModal />', () => {
|
||||
it('successfully renders', () => {
|
||||
render(<UnauthorizedModal onClose={vi.fn} action='FOLLOW' />);
|
||||
render(<UnauthorizedModal onClose={() => {}} action='FOLLOW' />);
|
||||
expect(screen.getByTestId('modal')).toBeInTheDocument();
|
||||
});
|
||||
|
||||
it('doesn\'t display the signup button by default', () => {
|
||||
render(<UnauthorizedModal onClose={vi.fn} action='FOLLOW' />);
|
||||
render(<UnauthorizedModal onClose={() => {}} action='FOLLOW' />);
|
||||
expect(screen.queryByText('Sign up')).not.toBeInTheDocument();
|
||||
});
|
||||
|
||||
describe('with registrations enabled', () => {
|
||||
it('displays the signup button', () => {
|
||||
render(<UnauthorizedModal onClose={vi.fn} action='FOLLOW' />, undefined, storeOpen);
|
||||
render(<UnauthorizedModal onClose={() => {}} action='FOLLOW' />, undefined, storeOpen);
|
||||
expect(screen.getByText('Sign up')).toBeInTheDocument();
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue