Skip to content

Conversation

@jimmy-lyons
Copy link

No description provided.

it('fetches peeps using fetchPeeps', () => {
fetch.mockResponseOnce(JSON.stringify([{"id":1234, "body":"Testing testing 1,2"}]));

const api = new ChitterApi;
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

minor comment, new ChitterApi could be moved to the before stattement

this.api.postPeep(this.sessionKey, this.userID, peepContent, (result) => {
console.log(result);
})
}
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does the page display the newly added peep automatically?

Copy link

@LGretzk LGretzk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well done, the api seems to be sufficiently tested, I also struggled with the view tests. Like you simple solution to user authentication.

}];

const api = new ChitterApi;
const model = new ChitterModel(testPeep);
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

interesting that you inject peeps into the model

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants