/react-unit-testing-case

Case Study - Unit Testing Case for Young Coders Club (Havas CX)

Primary LanguageJavaScript

React Unit Testing Case

This is the Unit Testing Case, a project given by the Young Coders Club (Havas CX).

About Case Study

The goal of this project is to write a function that generates a Fibonacci sequence with given starting and ending elements. For example, if the function fibonacci(3, 5) is called, the expected output would be [2, 3, 5]. The language or framework used does not matter. The goal is to write unit tests that test as many cases as possible for this function.

Some example cases that should be tested include:

  • Testing that the function correctly gives an error message when a negative value is entered as a parameter.
  • Testing that the correct value [2, 3, 5] is returned when 3 and 5 are entered as parameters.