Skip to content

Instantly share code, notes, and snippets.

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

Step One: Watch Writing Testable JavaScript - Rebecca Murphey from Full Frontal 2012 (award for worst conference name ever?)

Step Two: Fork this gist.

Step Three: Consider the four responsibilities that Rebecca lists for client side code (hint: they're color coded).

  • Did any of the responsibilities that she lists surprise you? I don't think that any of these tests suprise me, however, I definitely am not entirely sure how to go about testing each of these categories. Also, I feel like some of the categories sort of overlap and that is a bit confusing as well. For example, I feel like application state and data/server communication are closely coupled. Maybe this is just because I am not entirely sure what application state means, but in my mind application state would mean what the application looks like at any given point in time. For example, if the user hits the submit button, the application is now in some sort of a processing state, which is directly correlated to server communicaton.

  • Do you feel like you mentally split your client side code in IdeaBox and other past projects into these responsibilities? No, definitely not. Ideabox was sort of one big cluster of code for me. I am going to try to think of my application as having these four specific parts moving forward

Step Four: Totally Optional: take a look at some of the other forks and comment if the spirit moves you.

@rrgayhart
Copy link

👍

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