HMS-FAC / BoatlaunchMVP

MVP for Boatlaunch App
Creative Commons Zero v1.0 Universal
5 stars 0 forks source link

#36 made test work with mocked db #37

Closed katkelemen closed 8 years ago

katkelemen commented 8 years ago

in dataFunction.js the database is made into an argument of the dataFunctions.WrapperFunc function. in the backendTests.js REALFIREBASE flag can be set to true or false depending on using the real or the fake db, then FirebSlipwayArray can be passed as the db argument of the dataFunctions.WrapperFunc. if REALFIREBASE=true and fs.writeFile(__dirname+"/data/freezedata.json", JSON.stringify(snapshot)) line in dataFunction.js not commented out, running the test going to write freezedata.json file. This file is going to be compared when the test is running with REALFIREBASE=false and ..writeFile... line commented out.