testing tdd jasmine
DESCRIPTION
http://github.com/sideshowcoder/javascript-workshopTRANSCRIPT
TDD
...or how to develop software in style!
Some basics
Testing is not TDD
Test first is kind of TDD
TDD is software design
Familiar with TDD in ruby?
require "minitest/autorun" !class Foo def great? true end end !describe Foo do it "is great" do Foo.new.great?.must_equal true end end
Done any JavaScript testing?
Ok let’s build the simplest thing possible! !
FizzBuzz
What is important here?
Think what the outcome should be
Implement in the most straightforward way
Make it simpler!
Ok your turn!
Roman Numerals! 1 -> I, 2 -> II 4 -> IV 5 -> V 9 -> IX 10 -> X 40 -> XL 3999 -> MMMCMXCVIV !
npm install jasmine-node -g !
jasmine-node roman.spec.js
How did it go?
Ok those are the basics!