Skip to content

Commit

Permalink
test: fix broken for node@6+
Browse files Browse the repository at this point in the history
  • Loading branch information
haoxin committed Nov 1, 2016
1 parent 742d357 commit de592f4
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
Expand Up @@ -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 () {
Expand Down

0 comments on commit de592f4

Please sign in to comment.