- Created all Tests with Mocha: User + Todo tables
This commit is contained in:
@@ -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()]
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
@@ -1,10 +1,13 @@
|
||||
module.exports = Object.freeze({
|
||||
RIS_CODE_TODO_CREATING_NOTMYUSER: -1001,
|
||||
|
||||
RIS_CODE_ERR: -99,
|
||||
RIS_CODE_EMAIL_ALREADY_VERIFIED: -5,
|
||||
RIS_CODE_EMAIL_VERIFIED: 1,
|
||||
RIS_CODE_OK: 1,
|
||||
|
||||
RIS_CODE_LOGIN_ERR_GENERIC: -20,
|
||||
RIS_CODE_LOGIN_ERR: -10,
|
||||
RIS_CODE_OK: 1,
|
||||
|
||||
RIS_CODE_LOGIN_OK: 1,
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user