Skip to content

Commit

Permalink
Newer V8 names functions if they're assigned to a variable
Browse files Browse the repository at this point in the history
  • Loading branch information
isaacs committed Aug 31, 2016
1 parent f2a2a59 commit e775e69
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions test/test-args.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,21 +9,21 @@ function runTest (args, expect) {
delete obj.todo

var result = t._parseTestArgs.apply(t, args)
t.equal(result[0], expect[0])
t.match(result[0], expect[0])
t.same(result[1], expect[1])
t.equal(result[2], expect[2])
}

runTest(['name', obj, fn], ['name', obj, fn])
runTest(['name', fn], ['name', {}, fn])
runTest([obj, fn], ['(unnamed test)', obj, fn])
runTest([obj, fn], [/\(unnamed test\)|fn/, obj, fn])
runTest([obj, namedFunction], ['namedFunction', obj, namedFunction])
runTest(['name', obj], ['name', objTodo])
runTest(['name'], ['name', { todo: true }])
runTest([obj], ['(unnamed test)', objTodo])
runTest([fn], ['(unnamed test)', {}, fn])
runTest([obj], [/\(unnamed test\)|fn/, objTodo])
runTest([fn], [/\(unnamed test\)|fn/, {}, fn])
runTest([namedFunction], ['namedFunction', {}, namedFunction])
runTest([], ['(unnamed test)', { todo: true }])
runTest([], [/\(unnamed test\)|fn/, { todo: true }])

t.throws(function () {
runTest(['name', obj, 99], [])
Expand Down

0 comments on commit e775e69

Please sign in to comment.