Skip to content

Commit

Permalink
include every test
Browse files Browse the repository at this point in the history
  • Loading branch information
mhkeller committed Nov 16, 2015
1 parent e9ce3f6 commit 750a149
Showing 1 changed file with 14 additions and 13 deletions.
27 changes: 14 additions & 13 deletions test/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -352,19 +352,20 @@ describe('readdirFilter()', function () {
})
})

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

// })
// })
describe('include every', function () {
it('match expected output', function (done) {
var dir = path.join(__dirname, 'data', 'mixed')
io.readdirFilter(dir, {include: [/^data-1/, 'json'], includeMode: 'every'}, function (err, files) {
console.log(JSON.stringify(files))
assert(_.isEqual(JSON.stringify(files), '["data-1.json"]'))
if (err) {
console.error(err)
}
done()
})

})
})

describe('exclude by extension list and regex', function () {
it('match expected output', function (done) {
Expand Down

0 comments on commit 750a149

Please sign in to comment.