4IT580: Docs
4IT580 WebGithub

4th Homework

Goal of this this homework is to implement partial FizzBuzz using TDD (Test Driven Development).

Deadline: Wednesday 16/12/2020 - 23:59:59

If you have any problems contact your teacher using MS Teams: Tomas Horacek (@hort19).

Specification for FizzBuzz:

Example inputs and return values:

for const x = ...fizzBuzz(x) returns:
11
22
3"Fizz"
44
5"Buzz"
6"Fizz"
77
88
9"Fizz"
10"Buzz"
1111
12"Fizz"

Sidenote for JavaScript:

(it works with 5 too 😉)

Unit Tests

Start by crating following file: frontend/src/utils/__tests__/fizzbuzz.js

With this content:

Run yarn test to start TDD cycle.

Homework Goals





you can see example of TDD Unit Tests for Game of Life here:

Send the fizzbuzz.js file

Once you have finished (at least two tests for each rule 1., 2. and 4.; and works correctly for numbers from 1 to 12)

Deadline: Wednesday 16/12/2020 - 23:59:59

Happy Coding!