|
| 1 | +raindrops = require 'raindrops' |
| 2 | + |
| 3 | +describe 'raindrops', -> |
| 4 | + it 'the sound for 1 is 1', -> |
| 5 | + result = raindrops 1 |
| 6 | + assert.are.equal '1', result |
| 7 | + |
| 8 | + pending 'the sound for 3 is Pling', -> |
| 9 | + result = raindrops 3 |
| 10 | + assert.are.equal 'Pling', result |
| 11 | + |
| 12 | + pending 'the sound for 5 is Plang', -> |
| 13 | + result = raindrops 5 |
| 14 | + assert.are.equal 'Plang', result |
| 15 | + |
| 16 | + pending 'the sound for 7 is Plong', -> |
| 17 | + result = raindrops 7 |
| 18 | + assert.are.equal 'Plong', result |
| 19 | + |
| 20 | + pending 'the sound for 6 is Pling as it has a factor 3', -> |
| 21 | + result = raindrops 6 |
| 22 | + assert.are.equal 'Pling', result |
| 23 | + |
| 24 | + pending '2 to the power 3 does not make a raindrop sound as 3 is the exponent not the base', -> |
| 25 | + result = raindrops 8 |
| 26 | + assert.are.equal '8', result |
| 27 | + |
| 28 | + pending 'the sound for 9 is Pling as it has a factor 3', -> |
| 29 | + result = raindrops 9 |
| 30 | + assert.are.equal 'Pling', result |
| 31 | + |
| 32 | + pending 'the sound for 10 is Plang as it has a factor 5', -> |
| 33 | + result = raindrops 10 |
| 34 | + assert.are.equal 'Plang', result |
| 35 | + |
| 36 | + pending 'the sound for 14 is Plong as it has a factor of 7', -> |
| 37 | + result = raindrops 14 |
| 38 | + assert.are.equal 'Plong', result |
| 39 | + |
| 40 | + pending 'the sound for 15 is PlingPlang as it has factors 3 and 5', -> |
| 41 | + result = raindrops 15 |
| 42 | + assert.are.equal 'PlingPlang', result |
| 43 | + |
| 44 | + pending 'the sound for 21 is PlingPlong as it has factors 3 and 7', -> |
| 45 | + result = raindrops 21 |
| 46 | + assert.are.equal 'PlingPlong', result |
| 47 | + |
| 48 | + pending 'the sound for 25 is Plang as it has a factor 5', -> |
| 49 | + result = raindrops 25 |
| 50 | + assert.are.equal 'Plang', result |
| 51 | + |
| 52 | + pending 'the sound for 27 is Pling as it has a factor 3', -> |
| 53 | + result = raindrops 27 |
| 54 | + assert.are.equal 'Pling', result |
| 55 | + |
| 56 | + pending 'the sound for 35 is PlangPlong as it has factors 5 and 7', -> |
| 57 | + result = raindrops 35 |
| 58 | + assert.are.equal 'PlangPlong', result |
| 59 | + |
| 60 | + pending 'the sound for 49 is Plong as it has a factor 7', -> |
| 61 | + result = raindrops 49 |
| 62 | + assert.are.equal 'Plong', result |
| 63 | + |
| 64 | + pending 'the sound for 52 is 52', -> |
| 65 | + result = raindrops 52 |
| 66 | + assert.are.equal '52', result |
| 67 | + |
| 68 | + pending 'the sound for 105 is PlingPlangPlong as it has factors 3, 5 and 7', -> |
| 69 | + result = raindrops 105 |
| 70 | + assert.are.equal 'PlingPlangPlong', result |
| 71 | + |
| 72 | + pending 'the sound for 3125 is Plang as it has a factor 5', -> |
| 73 | + result = raindrops 3125 |
| 74 | + assert.are.equal 'Plang', result |
0 commit comments