Skip to content
This repository has been archived by the owner on Aug 24, 2019. It is now read-only.

Commit

Permalink
feat(React): Add a Home Component
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeason Centaure committed Jan 16, 2018
1 parent 714aa41 commit 5bd6e97
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 3 deletions.
10 changes: 10 additions & 0 deletions pages/Home.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import React from 'react'

const Home = () => (
<div>
<h1>React Quizz</h1>
<button>GitHub Connect</button>
</div>
)

export default Home
7 changes: 6 additions & 1 deletion pages/index.js
Original file line number Diff line number Diff line change
@@ -1 +1,6 @@
export default () => 'Hello world!'
import React from 'react'
import Home from './Home'

const index = () => <Home />

export default index
5 changes: 3 additions & 2 deletions pages/index.test.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
import React from 'react'
import { shallow } from 'enzyme'
import Home from './Home'
import Index from './index'

describe('Index', () => {
it('should display "Hello world!"', () => {
it('should render the HomeComponent', () => {
const wrapper = shallow(<Index />)
expect(wrapper.equals('Hello world!')).toBe(true)
expect(wrapper.contains(<Home />)).toBe(true)
})
})

0 comments on commit 5bd6e97

Please sign in to comment.