Skip to content

Commit

Permalink
add include exclude test
Browse files Browse the repository at this point in the history
  • Loading branch information
mhkeller committed Nov 16, 2015
1 parent 155a9e6 commit 5a6e59a
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions test/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -339,6 +339,20 @@ describe('readdirFilter()', function () {
})
})

describe('include and exclude by regex and extension list', function () {
it('match expected output', function (done) {
var dir = path.join(__dirname, 'data', 'mixed')
io.readdirFilter(dir, {exclude: ['tsv', 'csv'], include: /^data/}, function (err, files) {
assert(_.isEqual(JSON.stringify(files), '["data-0.json"]'))
if (err) {
console.error(err)
}
done()
})

})
})

describe('exclude by extension list and regex', function () {
it('match expected output', function (done) {
var dir = path.join(__dirname, 'data', 'mixed')
Expand Down

0 comments on commit 5a6e59a

Please sign in to comment.