File tree Expand file tree Collapse file tree 1 file changed +21
-1
lines changed Expand file tree Collapse file tree 1 file changed +21
-1
lines changed Original file line number Diff line number Diff line change @@ -63,6 +63,20 @@ describe('JSBloom - Bloom Filter', function() {
6363
6464 } ) ;
6565
66+ describe ( 'Non-Existence' , function ( ) {
67+ it ( 'should return false for 1000 non elements' , function ( ) {
68+ var positive = 0 ;
69+ for ( var i = 1000 - 1 ; i >= 0 ; i -- ) {
70+ if ( filter . checkEntry ( generator ( ) ) )
71+ positive ++ ;
72+ } ;
73+ assert . ok ( positive <= 10 , 'should have had less than 10 positive tests, but had:' + positive ) ;
74+ } ) ;
75+
76+ } ) ;
77+
78+
79+
6680 describe ( 'Import & Export' , function ( ) {
6781 it ( 'should return true on predefined element in imported array' , function ( ) {
6882 filter . importData ( importData ) ;
@@ -87,4 +101,10 @@ describe('JSBloom - Bloom Filter', function() {
87101
88102 } ) ;
89103
90- } ) ;
104+ } ) ;
105+
106+
107+
108+
109+
110+
You can’t perform that action at this time.
0 commit comments