This repository has been archived by the owner on Aug 24, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Jeason Centaure
committed
Jan 16, 2018
1 parent
714aa41
commit 0278427
Showing
3 changed files
with
19 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 firstComp = () => <Home /> | ||
|
||
export default firstComp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) | ||
}) | ||
}) |