TDD with KnockoutJS
Upcoming SlideShare
Loading in...5
×
 

Like this? Share it with your network

Share

TDD with KnockoutJS

on

  • 210 views

 

Statistics

Views

Total Views
210
Views on SlideShare
205
Embed Views
5

Actions

Likes
0
Downloads
3
Comments
1

3 Embeds 5

http://www.linkedin.com 2
http://www.slideee.com 2
https://www.linkedin.com 1

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
  • Here's the live coding demo: http://vimeo.com/user18611322/knockout-karma-tdd
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

TDD with KnockoutJS Presentation Transcript

  • 1. TDD KnockoutJS www.kylehodgson.com @kylehodgson
  • 2. Legacy Code
  • 3. Snake Charmer
  • 4. Test Driven Development ● Red ● Green ● Refactor
  • 5. Great! But what about your JavaScript?
  • 6. KnockoutJS
  • 7. KnockoutJS
  • 8. Jasmine Spec
  • 9. var self = this;
  • 10. var Fruit = function() { this.name = ko.observable(); } var myFruit = new Fruit(); myFruit.name="Mango";
  • 11. wrong! myFruit.name="Mango"; right! myFruit.name("Mango");
  • 12. var Fruit = function() { this.name = ko.observable(); } var myFruit = new Fruit(); myFruit.name("Mango"); console.log(myFruit.name);
  • 13. wrong! console.log(myFruit.name); right! console.log(myFruit.name());
  • 14. KarmaJS
  • 15. c:projectsToDontList> more toDontEnv.bat set HOME=c:userskhodgson set PATH=%PATH%;c:nuget set CHROME_BIN=%HOME%AppDataLocalGoogleChromeApplicationchrome. exe set IE_BIN=C:Program FilesInternet Exploreriexplore.exe set PHANTOMJS_BIN=%HOME%AppDataRoamingnpmphantomjs.cmd set FIREFOX_BIN=C:Program Files (x86)Mozilla Firefoxfirefox.exe
  • 16. Epic User Story As a busy executive, I'd like to keep track of things that aren't important, So that I can make sure that I don't do them.
  • 17. Live Code Section ToDontList
  • 18. Thanks! https://github.com/kylehodgson/ToDontList http://www.kylehodgson.com @kylehodgson kyle.hodgson@gmail.com