in dataFunction.js the database is made into an argument of the dataFunctions.WrapperFunc function. in the backendTests.jsREALFIREBASE 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.
in
dataFunction.js
the database is made into an argument of thedataFunctions.WrapperFunc
function. in thebackendTests.js
REALFIREBASE
flag can be set totrue
orfalse
depending on using the real or the fake db, thenFirebSlipwayArray
can be passed as the db argument of thedataFunctions.WrapperFunc
. ifREALFIREBASE=true
andfs.writeFile(__dirname+"/data/freezedata.json", JSON.stringify(snapshot))
line indataFunction.js
not commented out, running the test going to writefreezedata.json
file. This file is going to be compared when the test is running withREALFIREBASE=false
and..writeFile...
line commented out.