This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import expect from 'expect'; | |
import request from 'supertest'; | |
import app from '../index'; | |
describe('Test for Signup', () => { | |
it('should login users', (done) => { | |
const userDetail = { | |
username: 'christain5', | |
password: 'password@1', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = function schemmaRunner(dataObject, ruleSchema) { | |
console.log('+++++++ ', combineRuleSchema(dataObject, ruleSchema)); | |
}; | |
function combineRuleSchema(dataObject, ruleSchema) { | |
const result = []; | |
const ruleSet = ruleSchema.ruleSet; | |
if (ruleSet['and'] && ruleSet['and'].length) { | |
result.push(evaluateRuleSchema(ruleSet, dataObject, 'and')); | |
} |