fix: fix fibonacci implementation
[poolifier.git] / tests / test-utils.js
index 24b01e442ef7b0c63afd1a28d3e5261e82c34d6d..ceaff7be4c605140c546d1773493b56dcfb1e309 100644 (file)
@@ -81,7 +81,7 @@ class TestUtils {
    * @returns {number} - The nth fibonacci number.
    */
   static fibonacci (n) {
-    if (n <= 1) return 1
+    if (n <= 1) return n
     return TestUtils.fibonacci(n - 1) + TestUtils.fibonacci(n - 2)
   }