Skip to content

Instantly share code, notes, and snippets.

@patwey
Forked from rrgayhart/unit-testing-javascript.md
Last active February 26, 2016 16:48
Show Gist options
  • Save patwey/4adc6530c355e734af41 to your computer and use it in GitHub Desktop.
Save patwey/4adc6530c355e734af41 to your computer and use it in GitHub Desktop.

From: Writing Testable Javascript

Consider the four responsibilities that Rebecca lists for client side code

Did any of the responsibilities that she lists surprise you?

I think the one I've considered least in my past projects was application state, so that was the most surprising.

Do you feel like you mentally split your client side code in IdeaBox and other past projects into these responsibilities?

My personal project at the end of module 3 did not split up these responsibilities at all. I had code that would hit the Github API and deal with presentation & interaction all in the same function. I actually did consider the state of my app at one point in the project, so that dropping an Issue in the same column it was already in would not fire off an API call.

I did a better, but still poor, job of separating responsibility with my Ideabox project. I was able to split the logic for the presentation & interaction piece of my search bar apart from the rest of the code.

@rrgayhart
Copy link

👍

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