Bug report: bowling.test.ts
Your Typescript Bowling Exercise has an error in its testing. Someone forgot roll or somehow messed up.
I passed only 29 of the 31 tests. But the 2 tests I failed are below and are in error and should be fixed. Even the mentor aggreed with me. He saidHe took this test and passed it back then. So I imagine somehow the test.ts file must have been modified in error.
I used to be on a bowling for years. Simply do it manually without a computer. Place the rolls 1 line per fram and you will see the mistake.
it(two bonus rolls after a strike in the last frame cannot score more than 10 points
const rolls = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 5],
expect Error(Pin count exceeds pins on the lane)
Actually the error should be game not over, score not kown… etc. Most likely you are missing a roll for the test…
it(the second bonus rolls after a strike in the last frame cannot be a strike if the first one is not a strike
const rolls = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 6,]
EExpects: Error’Pin count exceeds pins on the lane)
Same as above missing a roll, so game not over score message should be returned.