Skip to content

Commit bf7dc7a

Browse files
committed
test that addEntry returns false when adding something which was already in the set
1 parent 7af57e6 commit bf7dc7a

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

test/test.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,16 @@ describe('JSBloom - Bloom Filter', function() {
6363

6464
});
6565

66+
describe('Duplicate Insertion', function() {
67+
it('should return true for 2000 added elements', function() {
68+
for (var i = test_entries.length - 1; i >= 0; i--) {
69+
assert.equal(filter.addEntry(test_entries[i]), false);
70+
};
71+
});
72+
73+
});
74+
75+
6676
describe('Non-Existence', function() {
6777
it('should return false for 1000 non elements', function() {
6878
var positive = 0;

0 commit comments

Comments
 (0)