Skip to content

Commit

Permalink
Merge pull request #8 from mcdonnelldean/patch-1
Browse files Browse the repository at this point in the history
checking arrays of objects
  • Loading branch information
mcollina committed Oct 11, 2016
2 parents 1819df4 + cf1e5b4 commit 61a3382
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions test.js
Original file line number Diff line number Diff line change
Expand Up @@ -422,3 +422,20 @@ test('each without results support with nothing to process', function (t) {
t.fail('this should never happen')
}
})

test('each works with arrays of objects', function (t) {
t.plan(3)

var instance = parallel({ results: false })
var obj = {}
var args = [{val: true}, {val: true}]

instance(obj, something, args, function () {
t.ok('done called')
})

function something (arg, cb) {
t.ok(arg.val)
cb()
}
})

0 comments on commit 61a3382

Please sign in to comment.