|
128 | 128 | equal(_.reduce([], _.noop, undefined), undefined, 'undefined can be passed as a special case'); |
129 | 129 | equal(_.reduce([_], _.noop), _, 'collection of length one with no initial value returns the first item'); |
130 | 130 |
|
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'); |
133 | 133 | }); |
134 | 134 |
|
135 | 135 | test('foldl', function() { |
|
151 | 151 |
|
152 | 152 | equal(_.reduceRight([], _.noop, undefined), undefined, 'undefined can be passed as a special case'); |
153 | 153 |
|
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'); |
156 | 156 |
|
157 | 157 | // Assert that the correct arguments are being passed. |
158 | 158 |
|
|
0 commit comments