Skip to content

Instantly share code, notes, and snippets.

@PenneyGadget
Forked from rrgayhart/testable-js.markdown
Last active April 6, 2016 03:21
Show Gist options
  • Save PenneyGadget/667a3f714d0ea176a253245b30668b58 to your computer and use it in GitHub Desktop.
Save PenneyGadget/667a3f714d0ea176a253245b30668b58 to your computer and use it in GitHub Desktop.
Writing Testable JavaScript
  • Watch Writing Testable JavaScript - Rebecca Murphey from Full Frontal 2012 (award for worst conference name ever?)

  • Consider the four responsibilities that Rebecca lists for client side code (hint: they're color coded).

presentation & interaction
data / server communication
application state
setup

  • Did any of the responsibilities that she lists surprise you?

She said you're supposed to write tests FIRST??? What the..?? Haha. But no, none of the responsibilities surprised me. I feel like Turing really instills us with good testing practices, so everything that Rebecca discusses in this talk is very reasonable and straightforward to me. It was nice however to see JavaScript tests and have someone talk through them, since it's all very new still.

  • Do you feel like you mentally split your client side code in IdeaBox and other past projects into these responsibilities?

Yes and no. Maybe? If I do, it just naturally happens that way - I've never built my test suite with these kinds of divisions in mind specifically. But I like the concept and each responsibility makes perfect sense as a way to separate and divide code. I will definitely keep this in mind moving forward.

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