Fun application that takes your age, and your life expectancy and tells you your expected age left converted to various solar bodies including Mars, Venus, Mercury & Jupiter.
By Austin Schrader
This project was created by Austin Schrader for the Friday project where we are using Test Driven Development and the Jest testing framework. It was created using CSS, HTML, JavaScript, Git, GitHub, and Markdown, VSCode, Emmet, Prettier, and Jest.
- Download this repository by clicking the "Clone or Download" button
- Navigate to the folder where it downloaded
- Open the index.html file inside of your preferred browser
- Congratulations, this is the website!
Describe: User
Test: "should correctly output the Earth age of the User object"
let user = new User(45);
Expect(user.earthAge).toEqual(45);
Test: "should correctly output the Mercury age of the User object"
let user = new User(45);
Expect(user.mercuryAge()).toEqual(45 / 0.24);
Test: "should correctly output the Venus age of the User object"
let user = new User(45);
Expect(user.venusAge()).toEqual(45 / 0.62);
Test: "should correctly output the Mars age of the User object"
let user = new User(45);
Expect(user.marsAge()).toEqual(45 / 1.88);
Test: "should correctly output the Jupiter age of the User object"
let user = new User(45);
Expect(user.jupiterAge()).toEqual(45 / 11.86);
Test: "should correctly output the life expectancy left in Earth years of the User object"
let user = new User(45);
Expect(user.earthYearsLeft()).toEqual(78.54 - 45);
Test: "should correctly output the life expectancy left in Mercury years of the User object"
let user = new User(45);
Expect(user.mercuryYearsLeft()).toEqual((78.54 - 45) / 0.24);
Test: "should correctly output the life expectancy left in Venus years of the User object"
let user = new User(45);
Expect(user.venusYearsLeft()).toEqual((78.54 - 45) / 0.62);
Test: "should correctly output the life expectancy left in Mars years of the User object"
let user = new User(45);
Expect(user.marsYearsLeft()).toEqual((78.54 - 45) / 1.88);
Test: "should correctly output the life expectancy left in Jupiter years of the User object"
let user = new User(45);
Expect(user.jupiterYearsLeft()).toEqual((78.54 - 45) / 11.86);
At this time, there are no known bugs. If you see spot a bug feel free to make a pull request.
- HTML
- CSS
- Git
- Github
- JavaScript
- VSCode
- Markdown
- Emmet (Extension)
- Prettier (Extension)
- Jest Testing Framework
This repository is licensed under the MIT license.
Copyright (c) 2020 by Austin Schrader