Skip to content

Commit

Permalink
test: fix broken for node@6+
Browse files Browse the repository at this point in the history
haoxin committed Nov 2, 2016
1 parent 742d357 commit a9531d6
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions test/test.js
Original file line number Diff line number Diff line change
@@ -8,9 +8,12 @@ it('fn.name', function () {

assert.equal('someCrazyName', thenify(someCrazyName).name)
assert.equal('someCrazyName', thenify(someCrazyName).name)

// In ES6 spec, functions can infer the name of an anonymous function from its syntactic position.
var noname = function () {}
assert.equal('', thenify(noname).name)
var name = noname.name

assert.equal(name, thenify(noname).name)
assert.equal(name, thenify.withCallback(noname).name)
})

it('fn.name (bound function)', function () {

0 comments on commit a9531d6

Please sign in to comment.