Skip to content

Commit

Permalink
Add filter tests
Browse files Browse the repository at this point in the history
  • Loading branch information
lennym committed Dec 23, 2015
1 parent 0c801eb commit a21f5b0
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions test/filter.js
@@ -0,0 +1,9 @@
var assert = require('assert');
var requireDir = require('..');

// filter the results to a particular file:
assert.deepEqual(requireDir('./simple', { filter: function (filename) { return filename.match(/a\.js$/); } }), {
a: 'a'
});

console.log('Filter tests passed.');

0 comments on commit a21f5b0

Please sign in to comment.