Table of contents● Is it an application or is it a website?● Is it a library, a framework, or application code?● Am I test-driving the code or not?● Testing tools● Testing techniques● Design patterns and architecture● Client-Sever?
Testing toolsThere are new tools every day! Some tools I use, thanks to @pasku1 & @eamodeorubio(follow these guys): Jasmine/Mocha Jasmine-node Chai – chaijs.com CasperJS / PhantomJS JsTestDriver Believe me, tools are there to support concepts,they are not important themselves!
Testing Rules & Test-First Rules● Test-first is absolutely different from testing.● Do not mock artifacts you dont own.● Use stubs for queries and mocks/spies for actions.● Exploratory testing is always necessary.
Factory Singleton More patterns: http://addyosmani.com/resources/essentialjsdesignpatterns/book
Optimal code for machines is hard to read for humans● Dont write code for machines, write it for humans● Do you really have performance metrics?● Google Closure Compiler● CoffeeScript● Do performance testing often