Browse Source

Changed test script to "mocha --exit" (seems to work?)

Luiserebii 2 years ago
parent
commit
8fc32c17a7
Signed by: Luiserebii <luis@serebii.io> GPG Key ID: 58A745E0A5422230
3 changed files with 2 additions and 2 deletions
  1. 1
    1
      package.json
  2. BIN
      routes/.api_v1.js.swp
  3. 1
    1
      routes/api_v1.js

+ 1
- 1
package.json View File

@@ -9,7 +9,7 @@
9 9
   "main": "node app.js",
10 10
   "scripts": {
11 11
     "start": "node app.js",
12
-    "test": "mocha"
12
+    "test": "mocha --exit"
13 13
   },
14 14
   "author": "Luiserebii",
15 15
   "license": "MIT",

BIN
routes/.api_v1.js.swp View File


+ 1
- 1
routes/api_v1.js View File

@@ -16,7 +16,7 @@ router.get("/fibonacci", function(req, res, next){
16 16
    if(!req.query.n) { return res.end("ERROR: No \"n\" parameter query passed."); }
17 17
 
18 18
    let n = parseInt(req.query.n, 10);
19
-   let fibResult = MathFun.fibonacci();
19
+   let fibResult = MathFun.fibonacci(n);
20 20
   
21 21
    let jsonRes = { result: fibResult, success: 200 };
22 22
    res.json(jsonRes);

Loading…
Cancel
Save