Skip to content

Instantly share code, notes, and snippets.

@brantwellman
Forked from rrgayhart/testable-js.markdown
Last active April 5, 2016 05:04
Show Gist options
  • Save brantwellman/5353b5353a3761c19e7246bb4201f978 to your computer and use it in GitHub Desktop.
Save brantwellman/5353b5353a3761c19e7246bb4201f978 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?
    • Presentation/interaction, data/server communication, application state, setup. The only one that surprised me a bit was the application state responsibility. I hadn't ever really put it in those terms before.
  • Do you feel like you mentally split your client side code in IdeaBox and other past projects into these responsibilities?
    • I didn't consciously split them up like this, but I did make some decisions that supported separating code in this manner...especially when it came to server communication and presentation/interaction. Thinking of it in this way in the future should be helpful.

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