Skip to content

Commit 79fd291

Browse files
committed
Merge pull request #1828 from megawac/qunit-testing
Remove use of deperecated QUnit.raises function
2 parents da17884 + ec2e697 commit 79fd291

File tree

3 files changed

+8
-9
lines changed

3 files changed

+8
-9
lines changed

test/.eslintrc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
"strictEqual": false,
1313
"notStrictEqual": false,
1414
"notEqual": false,
15-
"raises": false,
1615
"throws": false,
1716
"asyncTest": false,
1817
"start": false

test/collections.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -128,8 +128,8 @@
128128
equal(_.reduce([], _.noop, undefined), undefined, 'undefined can be passed as a special case');
129129
equal(_.reduce([_], _.noop), _, 'collection of length one with no initial value returns the first item');
130130

131-
raises(function() { _.reduce([], _.noop); }, TypeError, 'throws an error for empty arrays with no initial value');
132-
raises(function() {_.reduce(null, _.noop);}, TypeError, 'handles a null (without initial value) properly');
131+
throws(function() { _.reduce([], _.noop); }, TypeError, 'throws an error for empty arrays with no initial value');
132+
throws(function() {_.reduce(null, _.noop);}, TypeError, 'handles a null (without initial value) properly');
133133
});
134134

135135
test('foldl', function() {
@@ -151,8 +151,8 @@
151151

152152
equal(_.reduceRight([], _.noop, undefined), undefined, 'undefined can be passed as a special case');
153153

154-
raises(function() { _.reduceRight([], _.noop); }, TypeError, 'throws an error for empty arrays with no initial value');
155-
raises(function() {_.reduceRight(null, _.noop);}, TypeError, 'handles a null (without initial value) properly');
154+
throws(function() { _.reduceRight([], _.noop); }, TypeError, 'throws an error for empty arrays with no initial value');
155+
throws(function() {_.reduceRight(null, _.noop);}, TypeError, 'handles a null (without initial value) properly');
156156

157157
// Assert that the correct arguments are being passed.
158158

test/functions.js

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

43-
raises(function() { _.bind('notafunction'); }, TypeError, 'throws an error when binding to a non-function');
43+
throws(function() { _.bind('notafunction'); }, TypeError, 'throws an error when binding to a non-function');
4444
});
4545

4646
test('partial', function() {
@@ -81,9 +81,9 @@
8181
sayLast : function() { return this.sayHi(_.last(arguments)); }
8282
};
8383

84-
raises(function() { _.bindAll(moe); }, Error, 'throws an error for bindAll with no functions named');
85-
raises(function() { _.bindAll(moe, 'sayBye'); }, TypeError, 'throws an error for bindAll if the given key is undefined');
86-
raises(function() { _.bindAll(moe, 'name'); }, TypeError, 'throws an error for bindAll if the given key is not a function');
84+
throws(function() { _.bindAll(moe); }, Error, 'throws an error for bindAll with no functions named');
85+
throws(function() { _.bindAll(moe, 'sayBye'); }, TypeError, 'throws an error for bindAll if the given key is undefined');
86+
throws(function() { _.bindAll(moe, 'name'); }, TypeError, 'throws an error for bindAll if the given key is not a function');
8787

8888
_.bindAll(moe, 'sayHi', 'sayLast');
8989
curly.sayHi = moe.sayHi;

0 commit comments

Comments
 (0)