Lets users enter their age and the name of a planet to see how "old" they are on that planet. Built to practice bundling with webpack and Jest unit testing.
App can be viewed at wrunion.github.io/tdd-in-space-e20
Spec | Input | Output |
---|---|---|
Should take a user's age, and return their age on a given planet | User Input: Age: 10, Planet: Mercury | Output: 41.67 |
Should determine the life expectancy of a user, based on demographic data | User Input: Gender: female | Output: 72 |
Should calculate life expectancy on a chosen planet | User Input: Age: 25 Planet: Jupiter | Output: 75.81 |
If user has surpassed planetary life expectancy, return a special message instead | User Input: Age: 95, Planet: Mars | Output: Congrats! You beat father time! You've lived 12.24 years longer than expected on Mars! |
- Business logic is thoroughly tested with Jest.
- Each spec was committed before writing its corresponding code.
- Project utilizes ES6 features including classes, let and const.
- Dependencies are managed with npm.
- Webpack is used to lint, bundle, and process code.
You're welcome to submit a pull request if you find any issues. You can reach me at [email protected].
This software is licensed under the MIT license.
Copyright (c) 2020 Winter A. Runion