Skip to content

Commit

Permalink
Coverage of arguments to 0 and 1 arity functions.
Browse files Browse the repository at this point in the history
  • Loading branch information
flatheadmill committed Jun 18, 2018
1 parent 50caf41 commit 981f6c8
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion t/properties.t.js
@@ -1,7 +1,21 @@
require('proof')(9, prove)
require('proof')(13, prove)

function prove (assert) {
var cadence = require('..')
var zero = cadence(function () {
return [ arguments[1] ]
})
zero(1, function (error, one) {
assert([ one ], [ 1 ], 'zero single argument')
})
assert(zero.length, 0, 'zero arity')
var one = cadence(function (async) {
return [ arguments[1] ]
})
one(1, function (error, one) {
assert([ one ], [ 1 ], 'one single argument')
})
assert(one.length, 1, 'one arity')
var two = cadence(function (async, one) {
return [ one ]
})
Expand Down

0 comments on commit 981f6c8

Please sign in to comment.