Skip to content
/ TDDJS Public
forked from GSoster/TDDJS

A group of experiments with unit tests and TDD using Javascrip

Notifications You must be signed in to change notification settings

BMLab5/TDDJS

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 

Repository files navigation

TDDJS

A group of experiments with unit tests and TDD using Javascript

TDD

  • 1. Learn Test Driven Development (TDD)
    Tutorial source: https://github.com/dwyl/learn-tdd
    folder in this repository: vending-machine
    The objective of this tutorial is to create a vending-machine. It has only one method (getChange (totalPayable, cashPaid)) that receives the cost of an item and how much the user has inserted in the machine. It should then calculate the change among the possible options (coins = [200, 100, 50, 20, 10, 5, 2, 1]) and return it to the user as an array. Test cases: getChange(1, 1) should equal [] - an empty array getChange(215, 300) should return [50,20,10,5] getChange(486, 600) should equal [100, 10, 2, 2] getChange(12, 400) should return [200, 100, 50, 20, 5, 2, 1]
    all test pass

  • 2. Learn QUnit
    Tutorial source: https://github.com/dwyl/learn-qunit
    folder in this repository: learn-qunit
    A quick introduction to JavaScript unit testing with QUnit.js for complete beginners!
    all test pass

  • 3. Learn Tape
    Tutorial source: https://github.com/dwyl/learn-tape

  • 4. A Gentle Introduction to Javascript Test Driven Development
    Tutorial source: http://jrsinclair.com/articles/2016/gentle-introduction-to-javascript-tdd-intro/

Code Coverage

Code Quality

About

A group of experiments with unit tests and TDD using Javascrip

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 78.1%
  • HTML 21.6%
  • CSS 0.3%