• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
TDD with KnockoutJS
 

TDD with KnockoutJS

on

  • 132 views

 

Statistics

Views

Total Views
132
Views on SlideShare
127
Embed Views
5

Actions

Likes
0
Downloads
1
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

11 of 1 previous next

  • 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 TDD with KnockoutJS Presentation Transcript

    • TDD KnockoutJS www.kylehodgson.com @kylehodgson
    • Legacy Code
    • Snake Charmer
    • Test Driven Development ● Red ● Green ● Refactor
    • Great! But what about your JavaScript?
    • KnockoutJS
    • KnockoutJS
    • Jasmine Spec
    • var self = this;
    • var Fruit = function() { this.name = ko.observable(); } var myFruit = new Fruit(); myFruit.name="Mango";
    • wrong! myFruit.name="Mango"; right! myFruit.name("Mango");
    • var Fruit = function() { this.name = ko.observable(); } var myFruit = new Fruit(); myFruit.name("Mango"); console.log(myFruit.name);
    • wrong! console.log(myFruit.name); right! console.log(myFruit.name());
    • KarmaJS
    • 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
    • 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.
    • Live Code Section ToDontList
    • Thanks! https://github.com/kylehodgson/ToDontList http://www.kylehodgson.com @kylehodgson kyle.hodgson@gmail.com