Skip to content

Commit

Permalink
Auto merge of #61 - DockYard:add-index-test, r=poteto
Browse files Browse the repository at this point in the history
Add unit test to index

Relies on #60
  • Loading branch information
homu committed Feb 22, 2016
2 parents 9fdab36 + 19469d9 commit c97d3c5
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions test/index-test.js
Expand Up @@ -41,6 +41,17 @@ describe('index', function() {
expect(result).to.be.false;
});

it('should return `true` if a file is not in the whitelist', function() {
var name = 'range';
var dummyRegex = new RegExp('.*');
var lists = {
whitelist: ['inc']
};
var result = addonIndex.exclusionFilter(name, dummyRegex, lists);

expect(result).to.be.true;
});

it('should return `false` if a file is in both the whitelist and blacklist', function() {
var name = 'range';
var dummyRegex = new RegExp('.*');
Expand Down

0 comments on commit c97d3c5

Please sign in to comment.