Skip to content

Instantly share code, notes, and snippets.

@dastinnette
Forked from rrgayhart/testable-js.markdown
Last active April 3, 2016 03:13
Show Gist options
  • Save dastinnette/23c110ab993063455a83dbf96fefa105 to your computer and use it in GitHub Desktop.
Save dastinnette/23c110ab993063455a83dbf96fefa105 to your computer and use it in GitHub Desktop.
Writing Testable JavaScript

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?
    • The four responsibilities: Presentation & interaction, data/server communication, application state, and setup. I suppose I never considered application state as a independent piece of client side interaction, but rather split between presentation/interaction and data/server communication. It's interesting to see how someone else breaks down this large category and tests it accordingly.
  • Do you feel like you mentally split your client side code in IdeaBox and other past projects into these responsibilities?
    • Nah. It will be interesting to see as Steve and I push forward with refactoring gametime if our code naturally falls into these four buckets or if the process seems forced.

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

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