Skip to content

Commit e775e69

Browse files
committed
Newer V8 names functions if they're assigned to a variable
1 parent f2a2a59 commit e775e69

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

test/test-args.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,21 +9,21 @@ function runTest (args, expect) {
99
delete obj.todo
1010

1111
var result = t._parseTestArgs.apply(t, args)
12-
t.equal(result[0], expect[0])
12+
t.match(result[0], expect[0])
1313
t.same(result[1], expect[1])
1414
t.equal(result[2], expect[2])
1515
}
1616

1717
runTest(['name', obj, fn], ['name', obj, fn])
1818
runTest(['name', fn], ['name', {}, fn])
19-
runTest([obj, fn], ['(unnamed test)', obj, fn])
19+
runTest([obj, fn], [/\(unnamed test\)|fn/, obj, fn])
2020
runTest([obj, namedFunction], ['namedFunction', obj, namedFunction])
2121
runTest(['name', obj], ['name', objTodo])
2222
runTest(['name'], ['name', { todo: true }])
23-
runTest([obj], ['(unnamed test)', objTodo])
24-
runTest([fn], ['(unnamed test)', {}, fn])
23+
runTest([obj], [/\(unnamed test\)|fn/, objTodo])
24+
runTest([fn], [/\(unnamed test\)|fn/, {}, fn])
2525
runTest([namedFunction], ['namedFunction', {}, namedFunction])
26-
runTest([], ['(unnamed test)', { todo: true }])
26+
runTest([], [/\(unnamed test\)|fn/, { todo: true }])
2727

2828
t.throws(function () {
2929
runTest(['name', obj, 99], [])

0 commit comments

Comments
 (0)