Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
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_eq...
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
!

n...
How did it go?
Ok those are the basics!
Upcoming SlideShare
Loading in …5
×

Testing tdd jasmine

424 views

Published on

http://github.com/sideshowcoder/javascript-workshop

Published in: Technology
  • Be the first to comment

Testing tdd jasmine

  1. 1. TDD ...or how to develop software in style!
  2. 2. Some basics
  3. 3. Testing is not TDD
  4. 4. Test first is kind of TDD
  5. 5. TDD is software design
  6. 6. Familiar with TDD in ruby?
  7. 7. 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
  8. 8. Done any JavaScript testing?
  9. 9. Ok let’s build the simplest thing possible! ! FizzBuzz
  10. 10. What is important here?
  11. 11. Think what the outcome should be
  12. 12. Implement in the most straightforward way
  13. 13. Make it simpler!
  14. 14. Ok your turn!
  15. 15. 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
  16. 16. How did it go?
  17. 17. Ok those are the basics!

×