Fix style errors

This commit is contained in:
Raymond Feng 2016-04-05 16:11:25 -07:00
parent b7543e9402
commit e321bafdf9
2 changed files with 15 additions and 23 deletions

View File

@ -562,14 +562,14 @@ function applyFilter(filter) {
return false; return false;
} }
if (example.nin) { if (example.nin) {
for (var i = 0; i < example.nin.length; i++) { for (var i = 0; i < example.nin.length; i++) {
if (example.nin[i] == value) { if (example.nin[i] == value) {
return false; return false;
} }
} }
return true; return true;
} }
if ('neq' in example) { if ('neq' in example) {
return compare(example.neq, value) !== 0; return compare(example.neq, value) !== 0;

View File

@ -349,7 +349,7 @@ describe('Memory connector', function() {
it('should successfully extract 5 users matching a neq filter over array values', function(done) { it('should successfully extract 5 users matching a neq filter over array values', function(done) {
User.find({ User.find({
where: { where: {
'children': { neq: 'Dhani' }, children: { neq: 'Dhani' },
}, },
}, function(err, users) { }, function(err, users) {
should.not.exist(err); should.not.exist(err);
@ -358,28 +358,20 @@ describe('Memory connector', function() {
}); });
}); });
it('should successfully extract 3 users with inq', function (done) { it('should successfully extract 3 users with inq', function(done) {
User.find({ User.find({
where: { where: { seq: { inq: [0, 1, 5] }},
seq: { }, function(err, users) {
inq: [0, 1, 5]
}
}
}, function (err, users) {
should.not.exist(err); should.not.exist(err);
users.length.should.be.equal(3); users.length.should.be.equal(3);
done(); done();
}); });
}); });
it('should successfully extract 4 users with nin', function (done) { it('should successfully extract 4 users with nin', function(done) {
User.find({ User.find({
where: { where: { seq: { nin: [2, 3] }},
seq: { }, function(err, users) {
nin: [2, 3]
}
}
}, function (err, users) {
should.not.exist(err); should.not.exist(err);
users.length.should.be.equal(4); users.length.should.be.equal(4);
done(); done();