Unit testing with
   Your probably already doing it (debugging)   Prevents regression/allows REFACTORING   Fastest form of quality feedba...
   “The smallest testable part of an application”     JavaScript public function === unit   Utility Code   Functional ...
Practical
   TDD – test driven development     Write a test     Run it (it’s red)     Write some code     Run it (it goes green...
   Testing after the fact     Boring     Harder to write test code     Tightly coupled test code     Miss ‘conceptual...
   Test during development     New features ? Test driven development     Bug fixes ? write tests for the unit     Bef...
   Comprehensive suite of tests for your app   Test lines ratio to code @3 : 1   Run on every commit by CI   ‘Stop the...
   Behavior driven development (bdd)     describe(”your module", function() {             it(”should be unit tested", fu...
Unit testing with Jasmine
Upcoming SlideShare
Loading in...5
×

Unit testing with Jasmine

573

Published on

0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
573
On Slideshare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
7
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Transcript of "Unit testing with Jasmine"

  1. 1. Unit testing with
  2. 2.  Your probably already doing it (debugging) Prevents regression/allows REFACTORING Fastest form of quality feedback Allows you to work on other peoples code Improves the design of your code Is a form of living documentation
  3. 3.  “The smallest testable part of an application”  JavaScript public function === unit Utility Code Functional Code
  4. 4. Practical
  5. 5.  TDD – test driven development  Write a test  Run it (it’s red)  Write some code  Run it (it goes green)  Repeat.
  6. 6.  Testing after the fact  Boring  Harder to write test code  Tightly coupled test code  Miss ‘conceptual’ errors
  7. 7.  Test during development  New features ? Test driven development  Bug fixes ? write tests for the unit  Before refactor ? write tests before & modify
  8. 8.  Comprehensive suite of tests for your app Test lines ratio to code @3 : 1 Run on every commit by CI ‘Stop the line’ when a test fails
  9. 9.  Behavior driven development (bdd)  describe(”your module", function() { it(”should be unit tested", function() { expect(isUnitTested()).toBe(true); }); });
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×