stub tests for page components

This commit is contained in:
Sorrel Bri 2020-01-15 21:59:05 -08:00 committed by sorrelbri
parent 16d5c97e3f
commit 8d3991ef55
12 changed files with 57 additions and 12 deletions

View file

@ -2,7 +2,7 @@ import React from 'react';
import { render } from '@testing-library/react';
import Login from './Login';
test('renders app without crashing', () => {
test('renders Login without crashing', () => {
const { getByTestId } = render(<Login />);
const LoginDiv = getByTestId('Login');
expect(LoginDiv).toBeInTheDocument();

View file

@ -2,7 +2,7 @@ import React from 'react';
import { render } from '@testing-library/react';
import Signup from './Signup';
test('renders app without crashing', () => {
test('renders Signup without crashing', () => {
const { getByTestId } = render(<Signup />);
const SignupDiv = getByTestId('Signup');
expect(SignupDiv).toBeInTheDocument();

View file

@ -3,9 +3,9 @@ import './Account.scss';
const Account = () => {
return (
<>
<div className="Account" data-testid="Account">
<p>Account</p>
</>
</div>
);
}

View file

@ -0,0 +1,9 @@
import React from 'react';
import { render } from '@testing-library/react';
import Account from './Account';
test('renders Account without crashing', () => {
const { getByTestId } = render(<Account />);
const AccountDiv = getByTestId('Account');
expect(AccountDiv).toBeInTheDocument();
});

View file

@ -3,9 +3,9 @@ import './Game.scss';
const Game = () => {
return (
<>
<div className="Game" data-testid="Game">
<p>Game</p>
</>
</div>
);
}

View file

@ -0,0 +1,9 @@
import React from 'react';
import { render } from '@testing-library/react';
import Game from './Game';
test('renders Game without crashing', () => {
const { getByTestId } = render(<Game />);
const GameDiv = getByTestId('Game');
expect(GameDiv).toBeInTheDocument();
});

View file

@ -3,9 +3,9 @@ import './Home.scss';
const Home = () => {
return (
<>
<div className="Home" data-testid="Home">
<p>Home</p>
</>
</div>
);
}

View file

@ -0,0 +1,9 @@
import React from 'react';
import { render } from '@testing-library/react';
import Home from './Home';
test('renders Home without crashing', () => {
const { getByTestId } = render(<Home />);
const HomeDiv = getByTestId('Home');
expect(HomeDiv).toBeInTheDocument();
});

View file

@ -3,9 +3,9 @@ import './News.scss';
const News = () => {
return (
<>
<div className="News" data-testid="News">
<p>News</p>
</>
</div>
);
}

View file

@ -0,0 +1,9 @@
import React from 'react';
import { render } from '@testing-library/react';
import News from './News';
test('renders News without crashing', () => {
const { getByTestId } = render(<News />);
const NewsDiv = getByTestId('News');
expect(NewsDiv).toBeInTheDocument();
});

View file

@ -3,9 +3,9 @@ import './Room.scss';
const Room = () => {
return (
<>
<div className="Room" data-testid="Room">
<p>Room</p>
</>
</div>
);
}

View file

@ -0,0 +1,9 @@
import React from 'react';
import { render } from '@testing-library/react';
import Room from './Room';
test('renders Room without crashing', () => {
const { getByTestId } = render(<Room />);
const RoomDiv = getByTestId('Room');
expect(RoomDiv).toBeInTheDocument();
});