This file contains hidden or 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
import React from 'react'; | |
import App from './App'; | |
import { mount } from 'enzyme'; | |
import toJson from "enzyme-to-json" | |
it("should render the homepage for the non logged in user", () => { | |
const props = { | |
isLoggedIn: false, | |
username: null | |
} |
This file contains hidden or 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
import React from 'react'; | |
import PropTypes from "prop-types" | |
const Home = ({ username, tasks }) => ( | |
<div> | |
<p>Welcome, {username}!</p> | |
<ul> | |
{tasks && tasks.map((t, idx) => <li key={idx}>{t}</li>)} | |
</ul> | |
</div> |
This file contains hidden or 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
import React from 'react'; | |
import App from './App'; | |
import { mount } from 'enzyme'; | |
import toJson from "enzyme-to-json" | |
import Home from './Home'; | |
it("should render the homepage for the non logged in user", () => { | |
const props = { | |
isLoggedIn: false, | |
username: null |
This file contains hidden or 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
import React, { Component } from 'react'; | |
import PropTypes from "prop-types" | |
import Home from "./Home" | |
const fakeDatabase = { | |
"Heisenberg": [ | |
"8am - Chemistry classes at school", | |
"12:30pm - Meet Jesse for lunch", | |
"15pm - Meet Gus at the Pollos Hermanos", | |
"20pm - Dinner by the pool with Hank and Marie" |
NewerOlder