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.