SlideShare a Scribd company logo
Testable JavaScript



                            Sapporo.js
RubySapporoNight vol.14   (Ryunosuke SATO)
Community for people who like JavaScript.



      Sapporo.js
Sapporo.js




http://sapporojs.org
It’s my feature
Testable JavaScript
Testable JavaScript



                            Sapporo.js
RubySapporoNight vol.14   (Ryunosuke SATO)
Testable JavaScript
Testable JavaScript
Testable JavaScript
?
   ?
Test
Testable JavaScript
Testable JavaScript
In browser
Testable JavaScript
difficult
?
  ?
why
design
(^q^)
Testable JavaScript
Testable JavaScript
‘‘
http://blog.nodejitsu.com/scaling-isomorphic-javascript-code

                          : https://gist.github.com/1362110
http://documentcloud.github.com/backbone/
http://emberjs.com/
Testable JavaScript
Testable JavaScript
Testable
http://tasklist-demo.herokuapp.com/
source: https://github.com/tricknotes/task-list
(demo)
    http://tasklist-demo.herokuapp.com/
source: https://github.com/tricknotes/task-list
Testable JavaScript
Testable JavaScript
Testable JavaScript
Testable JavaScript
Testable JavaScript
‘‘
Testable JavaScript
Task



TaskView

                  TotalView
View

Model        publish
                    subscribe
                                TotalView
   Task
        publish   subscribe      View

                      TaskView

                        action
  Testable!!
Unit Test
View

Model        publish
                    subscribe
                                TotalView
   Task
        publish   subscribe      View

                      TaskView

                        action
http://visionmedia.github.com/mocha/
Unit Test
Unit Test




using:
 mocha( http://visionmedia.github.com/mocha/ )
 expect.js( https://github.com/LearnBoost/expect.js )
Acceptance Test
View

Model        publish
                    subscribe
                                TotalView
   Task
        publish   subscribe      View

                      TaskView

                        action
http://zombie.labnotes.org/
Acceptance Test
Acceptance Test




using:
 mocha( http://visionmedia.github.com/mocha/ )
 expect.js( https://github.com/LearnBoost/expect.js )
 zombie ( http://zombie.labnotes.org/ )
Ruby         JavaScript


   TestUnit        QUnit

                   jasmine
    RSpec
                    mocha

capybara-webkit    zombie
Ruby         JavaScript


  cucumber       cucumber

                 should.js
RSpec(matcher)
                 expect.js




                              etc...
Testable JavaScript
Testable JavaScript
Testable JavaScript
Testable JavaScript
Testable JavaScript
http://www.flickr.com/photos/ku_photodigital/6309174528

More Related Content

Testable JavaScript