From 3f2417dd4d1e29bc4da5074442223b5138511c59 Mon Sep 17 00:00:00 2001 From: Sorrel Bri Date: Wed, 15 Jan 2020 21:59:05 -0800 Subject: [PATCH] stub tests for page components --- .../play-node-go/src/components/Login/Login.test.js | 2 +- .../play-node-go/src/components/Signup/Signup.test.js | 2 +- .../play-node-go/src/pages/Account/Account.js | 4 ++-- .../play-node-go/src/pages/Account/Account.test.js | 9 +++++++++ .../play-node-go/play-node-go/src/pages/Game/Game.js | 4 ++-- .../play-node-go/src/pages/Game/Game.test.js | 9 +++++++++ .../play-node-go/play-node-go/src/pages/Home/Home.js | 4 ++-- .../play-node-go/src/pages/Home/Home.test.js | 9 +++++++++ .../play-node-go/play-node-go/src/pages/News/News.js | 4 ++-- .../play-node-go/src/pages/News/News.test.js | 9 +++++++++ .../play-node-go/play-node-go/src/pages/Room/Room.js | 4 ++-- .../play-node-go/src/pages/Room/Room.test.js | 9 +++++++++ 12 files changed, 57 insertions(+), 12 deletions(-) diff --git a/packages/play-node-go/play-node-go/src/components/Login/Login.test.js b/packages/play-node-go/play-node-go/src/components/Login/Login.test.js index 08b6734..715bbae 100644 --- a/packages/play-node-go/play-node-go/src/components/Login/Login.test.js +++ b/packages/play-node-go/play-node-go/src/components/Login/Login.test.js @@ -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(); const LoginDiv = getByTestId('Login'); expect(LoginDiv).toBeInTheDocument(); diff --git a/packages/play-node-go/play-node-go/src/components/Signup/Signup.test.js b/packages/play-node-go/play-node-go/src/components/Signup/Signup.test.js index ab658f0..e722227 100644 --- a/packages/play-node-go/play-node-go/src/components/Signup/Signup.test.js +++ b/packages/play-node-go/play-node-go/src/components/Signup/Signup.test.js @@ -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(); const SignupDiv = getByTestId('Signup'); expect(SignupDiv).toBeInTheDocument(); diff --git a/packages/play-node-go/play-node-go/src/pages/Account/Account.js b/packages/play-node-go/play-node-go/src/pages/Account/Account.js index 5c7c255..32db3d2 100644 --- a/packages/play-node-go/play-node-go/src/pages/Account/Account.js +++ b/packages/play-node-go/play-node-go/src/pages/Account/Account.js @@ -3,9 +3,9 @@ import './Account.scss'; const Account = () => { return ( - <> +

Account

- +
); } diff --git a/packages/play-node-go/play-node-go/src/pages/Account/Account.test.js b/packages/play-node-go/play-node-go/src/pages/Account/Account.test.js index e69de29..92508c8 100644 --- a/packages/play-node-go/play-node-go/src/pages/Account/Account.test.js +++ b/packages/play-node-go/play-node-go/src/pages/Account/Account.test.js @@ -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(); + const AccountDiv = getByTestId('Account'); + expect(AccountDiv).toBeInTheDocument(); +}); diff --git a/packages/play-node-go/play-node-go/src/pages/Game/Game.js b/packages/play-node-go/play-node-go/src/pages/Game/Game.js index 17aaaaf..e4dbd4b 100644 --- a/packages/play-node-go/play-node-go/src/pages/Game/Game.js +++ b/packages/play-node-go/play-node-go/src/pages/Game/Game.js @@ -3,9 +3,9 @@ import './Game.scss'; const Game = () => { return ( - <> +

Game

- +
); } diff --git a/packages/play-node-go/play-node-go/src/pages/Game/Game.test.js b/packages/play-node-go/play-node-go/src/pages/Game/Game.test.js index e69de29..ec095ab 100644 --- a/packages/play-node-go/play-node-go/src/pages/Game/Game.test.js +++ b/packages/play-node-go/play-node-go/src/pages/Game/Game.test.js @@ -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(); + const GameDiv = getByTestId('Game'); + expect(GameDiv).toBeInTheDocument(); +}); diff --git a/packages/play-node-go/play-node-go/src/pages/Home/Home.js b/packages/play-node-go/play-node-go/src/pages/Home/Home.js index 292eba5..4bebd90 100644 --- a/packages/play-node-go/play-node-go/src/pages/Home/Home.js +++ b/packages/play-node-go/play-node-go/src/pages/Home/Home.js @@ -3,9 +3,9 @@ import './Home.scss'; const Home = () => { return ( - <> +

Home

- +
); } diff --git a/packages/play-node-go/play-node-go/src/pages/Home/Home.test.js b/packages/play-node-go/play-node-go/src/pages/Home/Home.test.js index e69de29..64bd612 100644 --- a/packages/play-node-go/play-node-go/src/pages/Home/Home.test.js +++ b/packages/play-node-go/play-node-go/src/pages/Home/Home.test.js @@ -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(); + const HomeDiv = getByTestId('Home'); + expect(HomeDiv).toBeInTheDocument(); +}); diff --git a/packages/play-node-go/play-node-go/src/pages/News/News.js b/packages/play-node-go/play-node-go/src/pages/News/News.js index f328772..f03618e 100644 --- a/packages/play-node-go/play-node-go/src/pages/News/News.js +++ b/packages/play-node-go/play-node-go/src/pages/News/News.js @@ -3,9 +3,9 @@ import './News.scss'; const News = () => { return ( - <> +

News

- +
); } diff --git a/packages/play-node-go/play-node-go/src/pages/News/News.test.js b/packages/play-node-go/play-node-go/src/pages/News/News.test.js index e69de29..8fdd358 100644 --- a/packages/play-node-go/play-node-go/src/pages/News/News.test.js +++ b/packages/play-node-go/play-node-go/src/pages/News/News.test.js @@ -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(); + const NewsDiv = getByTestId('News'); + expect(NewsDiv).toBeInTheDocument(); +}); diff --git a/packages/play-node-go/play-node-go/src/pages/Room/Room.js b/packages/play-node-go/play-node-go/src/pages/Room/Room.js index 115002e..85f07cd 100644 --- a/packages/play-node-go/play-node-go/src/pages/Room/Room.js +++ b/packages/play-node-go/play-node-go/src/pages/Room/Room.js @@ -3,9 +3,9 @@ import './Room.scss'; const Room = () => { return ( - <> +

Room

- +
); } diff --git a/packages/play-node-go/play-node-go/src/pages/Room/Room.test.js b/packages/play-node-go/play-node-go/src/pages/Room/Room.test.js index e69de29..7693458 100644 --- a/packages/play-node-go/play-node-go/src/pages/Room/Room.test.js +++ b/packages/play-node-go/play-node-go/src/pages/Room/Room.test.js @@ -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(); + const RoomDiv = getByTestId('Room'); + expect(RoomDiv).toBeInTheDocument(); +});