项目作者: ramigs

项目描述 :
fizzbuzz challenge using TDD
高级语言: JavaScript
项目地址: git://github.com/ramigs/fizzbuzz-tdd.git
创建时间: 2019-12-02T10:08:14Z
项目社区:https://github.com/ramigs/fizzbuzz-tdd

开源协议:

下载


fizzbuzz-tdd

TODO

  • The fizzbuzz generation is mixed in with its reporting. Code written this way breaks the single responsibility principle and as such may be harder to test, reason about, and change.
  • When I exercise the FizzBuzz with an invalid range of (start: 1, end: 0), I get “false” on the console, which doesn’t tell me what I did wrong and forces me to read the code to find out.
  • Test should have more descriptive titles like “decimal numbers are not allowed” instead of “fizzbuzz 3 16.5 returns”.

Requirements

Node.js and npm

Running fizzbuzz

Navigate to desired Step:

  1. $ cd src/Step1

Run program:

  1. $ node fizzbuzz 2 12

Running Test Suites

Install Jest:

  1. $ npm install

Run all Test Suites:

  1. $ npm test