Skip to content

Instantly share code, notes, and snippets.

@matt-stj
Forked from rrgayhart/unit-testing-javascript.md
Last active February 26, 2016 16:46
Show Gist options
  • Save matt-stj/5dcaa6149542b72386ee to your computer and use it in GitHub Desktop.
Save matt-stj/5dcaa6149542b72386ee 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?
  • All of the responsibilities that Rebecca lists make sense now, but I hadn't thought to break up my Javascript that way before. In the past, I wrote code based on convenience instead of splitting them up into clearly-defined pieces. I really like the data/communication/server interactions piece, as I wasn't breaking up my code that way before.
  • Do you feel like you mentally split your client side code in IdeaBox and other past projects into these responsibilities?
  • No, however, it's makeing a lot more sense as I become more comfortable with JS how to structure files/functions into individual responsibilities.

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