Closed ghassanmas closed 5 years ago
https://github.com/FACK1/week8---SAAO/blob/b4add2e4deb6c93eda20b56461470e466d444fba/src/database/db_build.js#L17-L20
In order to handle the two cases of running db_build.js where once you need to export it in case of NODE_ENV==TEST, or to run it otherwise...
db_build.js
NODE_ENV==TEST
if (process.env.NODE_ENV === "TEST") { module.exports = buildDB; } else { buildDB(); }
done
https://github.com/FACK1/week8---SAAO/blob/b4add2e4deb6c93eda20b56461470e466d444fba/src/database/db_build.js#L17-L20
In order to handle the two cases of running
db_build.js
where once you need to export it in case ofNODE_ENV==TEST
, or to run it otherwise...