| Total Complexity | 9 |
| Complexity/F | 1 |
| Lines of Code | 35 |
| Function Count | 9 |
| Duplicated Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | import { age } from './space-age'; |
||
| 2 | |||
| 3 | describe('Space Age', () => { |
||
| 4 | test('age on Earth', () => { |
||
| 5 | expect(age('earth', 1000000000)).toEqual(31.69); |
||
| 6 | }); |
||
| 7 | |||
| 8 | test('age on Mercury', () => { |
||
| 9 | expect(age('mercury', 2134835688)).toEqual(280.88); |
||
| 10 | }); |
||
| 11 | |||
| 12 | test('age on Venus', () => { |
||
| 13 | expect(age('venus', 189839836)).toEqual(9.78); |
||
| 14 | }); |
||
| 15 | |||
| 16 | test('age on Mars', () => { |
||
| 17 | expect(age('mars', 2129871239)).toEqual(35.88); |
||
| 18 | }); |
||
| 19 | |||
| 20 | test('age on Jupiter', () => { |
||
| 21 | expect(age('jupiter', 901876382)).toEqual(2.41); |
||
| 22 | }); |
||
| 23 | |||
| 24 | test('age on Saturn', () => { |
||
| 25 | expect(age('saturn', 2000000000)).toEqual(2.15); |
||
| 26 | }); |
||
| 27 | |||
| 28 | test('age on Uranus', () => { |
||
| 29 | expect(age('uranus', 1210123456)).toEqual(0.46); |
||
| 30 | }); |
||
| 31 | |||
| 32 | test('age on Neptune', () => { |
||
| 33 | expect(age('neptune', 1821023456)).toEqual(0.35); |
||
| 34 | }); |
||
| 35 | }); |
||
| 36 |