Skip to content

Instantly share code, notes, and snippets.

@adamki
Forked from rrgayhart/unit-testing-javascript.md
Last active February 25, 2016 19:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save adamki/74b64e1838674bc8b2ac to your computer and use it in GitHub Desktop.
Save adamki/74b64e1838674bc8b2ac 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?

presentation & interaction data/server communication application state setup

I wouldn't say that I was surprised like. OMG WHAAAA?

I would say that I was mostly aware of the most of the concepts. I wouldnt be able to list them out. I would say I understood that is usually consumed or passed as data from some sort of server interaction. Next, I would say that presentation and interaction is pretty much obvious since it is the very purpose of client side code IMO. Next, I think that state is something I am new to, but starting to understand ever since writing some react code. Lastly, Setup seems to be a bit weird, I dont really know how to explain it.

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

Yea, I think so! My code had obvious file seperation that mimic-ed SRP. This was mainly devided between behavior(fns), things(obj), and actions(events/listeners).

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