Skip to content

Commit 813d392

Browse files
committed
Merge pull request #1591 from mattrobenolt/better-test
Simply assert that a TypeError is raised
2 parents 2668d0a + 20c73e0 commit 813d392

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

test/functions.js

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,7 @@
3939
equal(Boundf().hello, 'moe curly', "When called without the new operator, it's OK to be bound to the context");
4040
ok(newBoundf instanceof F, 'a bound instance is an instance of the original function');
4141

42-
raises(
43-
function() { _.bind('notafunction'); },
44-
function(actual) { return actual instanceof TypeError && actual.message !== ''; },
45-
'throws an error when binding to a non-function'
46-
);
42+
raises(function() { _.bind('notafunction'); }, TypeError, 'throws an error when binding to a non-function');
4743
});
4844

4945
test('partial', function() {

0 commit comments

Comments
 (0)