mirror of
https://github.com/amark/gun.git
synced 2025-03-30 15:08:33 +00:00
Add extra tests, catch bad guy, obliterate bug.
This commit is contained in:
parent
972221972a
commit
0e8e9d7dba
@ -324,7 +324,7 @@
|
||||
});
|
||||
console.STAT && console.STAT(S, +new Date - S, "rad check");
|
||||
}
|
||||
r.find(key, g.find);
|
||||
r.find(key || (o.reverse? (o.end||'') : (o.start||'')), g.find);
|
||||
}
|
||||
function rev(a,b){ return b }
|
||||
var revo = {reverse: true};
|
||||
|
@ -210,6 +210,30 @@ var names = ["Adalard","Adora","Aia","Albertina","Alfie","Allyn","Amabil","Ammam
|
||||
}, opt);
|
||||
});
|
||||
|
||||
it('read contacts range', function(done){
|
||||
var opt = {};
|
||||
opt.end = 'nothing';
|
||||
opt.start = 'keeley';
|
||||
var first, last;
|
||||
var all = {}, start = opt.start.toLowerCase(), end = opt.end.toLowerCase();
|
||||
names.forEach(function(v,i){
|
||||
v = v.toLowerCase();
|
||||
if(v < start){ return }
|
||||
if(end < v){ return }
|
||||
//console.log(v, i);
|
||||
all[v] = v;
|
||||
//rad(v, i)
|
||||
});
|
||||
rad('', function(err, data){
|
||||
Radix.map(data, function(v,k){
|
||||
//console.log(k, v);
|
||||
delete all[k];
|
||||
});
|
||||
if(!Object.empty(all)){ return }
|
||||
done();
|
||||
}, opt);
|
||||
});
|
||||
|
||||
it('read contacts start end', function(done){
|
||||
var opt = {};
|
||||
opt.start = 'Warring'.toLowerCase();
|
||||
|
Loading…
x
Reference in New Issue
Block a user