Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/dimitridumont/tdd-fizzbuzz-js


https://github.com/dimitridumont/tdd-fizzbuzz-js

Last synced: about 1 month ago
JSON representation

Awesome Lists containing this project

README

        

# FizzBuzz kata - TDD in Javascript

## Rules
- print integers 1 to N
- print “Fizz” if an integer is divisible by 3
- print “Buzz” if an integer is divisible by 5
- print “FizzBuzz” if an integer is divisible by both 3 and 5

## Steps
1. return the "1" if the number is 1
2. return the number
3. return "Fizz" if the number is 3
4. return "Fizz" if the number is multiple of 3
5. return "Buzz" if the number is 5
6. return "Buzz" if the number is multiple of 5
7. return "FizzBuzz" if the number is multiple of 5 and 3

## Commit flow
1. write test
2. test fail
3. write code
4. test pass
5. refactoring
6. commit