The FizzBuzz game is written using node.js with the Babel ES6 transpiler. This package includes source code and unit tests.
You need to build the app before you can play it. In your Bash terminal run npm install
to install the app dependencies. Then run npm run build
to build the app.
You can play the FizzBuzz game by running npm run play
from your Linux console. Exit the game with ctrl + c
.
./lib
contains the transpiled, distribution-ready code for the FizzBuzz game. (This directory is empty until you build the app.)
./src
contains the ES6 source code for the FizzBuzz game.
./test
provides unit tests for the FizzBuzz game. Tests are run using the Mocha test driver and Chai assertion library. Run tests with npm run test
. (Don't forget to run npm install
first.)
This app could be improved with a few additional features:
- Type checking to ensure the inputs are numbers (not implemented)
- Support for decimal input (not implemented)
- Support for substitutions in any order (currently substitutions must be submitted entered ascending order)
- Additional test coverage