Skip to content

Commit f76ad1b

Browse files
authored
Merge pull request ironhack-labs#1735 from abernier/patch-1
compare to a fractional number
2 parents ae7fb22 + d022d2a commit f76ad1b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tests/functions-and-arrays.spec.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -189,9 +189,9 @@ describe('Bonus: Calculate the average of a mixed elements array', () => {
189189

190190
test('should return the average of the array', () => {
191191
// false is counted as 0
192-
expect(avg([6, 12, 'miami', 1, 'barca', '200', 'lisboa', 8, false])).toBe(5.11);
192+
expect(avg([6, 12, 'miami', 1, 'barca', '200', 'lisboa', 8, false])).toBe(46/9);
193193
// true is counted as 1
194-
expect(avg([6, 12, 'miami', 1, 'barca', '200', 'lisboa', 8, true])).toBe(5.22);
194+
expect(avg([6, 12, 'miami', 1, 'barca', '200', 'lisboa', 8, true])).toBe(47/9);
195195
});
196196
});
197197

0 commit comments

Comments
 (0)