Skip to content

Instantly share code, notes, and snippets.

@rickbacci
Forked from rrgayhart/unit-testing-javascript.md
Last active December 8, 2015 18:41
Show Gist options
  • Save rickbacci/cf4ab176b22dd5312e26 to your computer and use it in GitHub Desktop.
Save rickbacci/cf4ab176b22dd5312e26 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: Respond to this question in your fork: Consider the four responsibilities that Rebecca lists for client side code (hint: they're color coded). Respond below with your thoughts. Did any of the responsibilities that she lists surprise you? Do you feel like you mentally split your client side code in IdeaBox and other past projects into these responsibilities?

Looking at the 4 responsibilites makes me think of MVC. Model is 'data/server communication', View is 'presentation and interaction', and Controller is 'setup'. It doesn't suprise me, becuase she breaks the parts of the app into logical parts.

I don't think I mentally did this in ideabox, and my previous projects. I'm sure I broke some things into their own functions, but I didn't look at it from this point of view.

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

@rrgayhart
Copy link

I liked this video because her breakdown of unit testing made me feel a little bit more like I was in a happy ruby land when thinking about JS testing. I definitely didn't look at my first JS code in the way she does in the video. :D

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