Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Suggested reorder of tests for space-age #302

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
111 changes: 55 additions & 56 deletions exercises/space-age/space-age.test.ts
Original file line number Diff line number Diff line change
@@ -1,56 +1,55 @@
import SpaceAge from './space-age'

describe('Space Age', () => {

it('age in seconds', () => {
const age = new SpaceAge(1000000)
expect(age.seconds).toEqual(1000000)
})

xit('age in earth years', () => {
const age = new SpaceAge(1000000000)
expect(age.onEarth()).toEqual(31.69)
})

xit('age in mercury years', () => {
const age = new SpaceAge(2134835688)
expect(age.onEarth()).toEqual(67.65)
expect(age.onMercury()).toEqual(280.88)
})

xit('age in venus years', () => {
const age = new SpaceAge(189839836)
expect(age.onEarth()).toEqual(6.02)
expect(age.onVenus()).toEqual(9.78)
})

xit('age in mars years', () => {
const age = new SpaceAge(2329871239)
expect(age.onEarth()).toEqual(73.83)
expect(age.onMars()).toEqual(39.25)
})

xit('age in jupiter years', () => {
const age = new SpaceAge(901876382)
expect(age.onEarth()).toEqual(28.58)
expect(age.onJupiter()).toEqual(2.41)
})

xit('age in saturn years', () => {
const age = new SpaceAge(3000000000)
expect(age.onEarth()).toEqual(95.06)
expect(age.onSaturn()).toEqual(3.23)
})

xit('age in uranus years', () => {
const age = new SpaceAge(3210123456)
expect(age.onEarth()).toEqual(101.72)
expect(age.onUranus()).toEqual(1.21)
})

xit('age in neptune year', () => {
const age = new SpaceAge(8210123456)
expect(age.onEarth()).toEqual(260.16)
expect(age.onNeptune()).toEqual(1.58)
})
})
import SpaceAge from "./space-age";

describe("Space Age", () => {
it("age in seconds", () => {
const age = new SpaceAge(1000000);
expect(age.seconds).toEqual(1000000);
});

xit("age in earth years", () => {
const age = new SpaceAge(1000000000);
expect(age.onEarth()).toEqual(31.69);
});

xit("age in mercury years", () => {
const age = new SpaceAge(2134835688);
expect(age.onMercury()).toEqual(280.88);
expect(age.onEarth()).toEqual(67.65);
});

xit("age in venus years", () => {
const age = new SpaceAge(189839836);
expect(age.onVenus()).toEqual(9.78);
expect(age.onEarth()).toEqual(6.02);
});

xit("age in mars years", () => {
const age = new SpaceAge(2329871239);
expect(age.onMars()).toEqual(39.25);
expect(age.onEarth()).toEqual(73.83);
});

xit("age in jupiter years", () => {
const age = new SpaceAge(901876382);
expect(age.onJupiter()).toEqual(2.41);
expect(age.onEarth()).toEqual(28.58);
});

xit("age in saturn years", () => {
const age = new SpaceAge(3000000000);
expect(age.onSaturn()).toEqual(3.23);
expect(age.onEarth()).toEqual(95.06);
});

xit("age in uranus years", () => {
const age = new SpaceAge(3210123456);
expect(age.onUranus()).toEqual(1.21);
expect(age.onEarth()).toEqual(101.72);
});

xit("age in neptune year", () => {
const age = new SpaceAge(8210123456);
expect(age.onNeptune()).toEqual(1.58);
expect(age.onEarth()).toEqual(260.16);
});
});