- Created all Tests with Mocha: User + Todo tables

This commit is contained in:
Paolo Arena
2019-02-07 00:52:48 +01:00
parent 779bd1cb63
commit 87378fe732
10 changed files with 309 additions and 150 deletions

View File

@@ -3,5 +3,27 @@ var os = require("os");
module.exports = {
getHostname: function () {
return os.hostname()
},
testing: function () {
return (process.env.TESTING_ON === '1')
},
mylog: function (...args) {
if (!this.testing())
console.log(args)
},
mylogshow: function (...args) {
console.log(args)
},
allfieldTodo: function () {
return ['userId', 'pos', 'category', 'descr', 'priority', 'completed', 'created_at', 'modify_at',
'completed_at', 'expiring_at', 'enableExpiring', 'id_prev', 'id_next', 'progress', 'modified']
},
allfieldTodoWithId: function () {
return ['_id', ...this.allfieldTodo()]
}
};