Skip to content

ibm-cloud-academy/javascript-tdd

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

IBM Cloud Garage Method

javascript test-driven-development [TDD]

This repository is used for the IBM Garage Method TDD course to illistrate the fundamentals of TDD using javascript


Getting Started

Prerequisites

You will need the following installed

  • Node.js
  • Git command line

Clone the repo, install and run the tests:

To setup and execute the tests perform the following in a terminal window

git clone git@github.com:ibm-cloud-academy/javascript-tdd.git
cd javascript-tdd
npm install mocha --save-dev
npm install should --save-dev
npm test

References

  • Passes the tests
  • Reveals intention
  • No duplication
  • Fewest elements
(01) [{} –> nil] no code => return nil

(02) [nil->constant] nil => simple constant

(03) [constant->constant+] simple constant => complex constant

(04) [constant->scalar] complex constant => variable or an argument

(05) [statement->statements] adding more unconditional statements.

(06) [unconditional->if] splitting the execution path

(07) [scalar->array]

(08) [array->container]

(09) [statement->recursion]

(10) [if->while]

(11) [expression->function] replacing an expression with a function or algorithm

(12) [variable->assignment] replacing the value of a variable.
(01) constant => a value

(02) scalar => a local binding, or variable

(03) invocation => calling a function/method

(04) conditional => if/switch/case/cond

(05) while loop => applies to for loops as well

(06) assignment => replacing the value of a variable

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published