Sha256: f54857d368fb733cd5ad3dc786367ebadb135e126080a3277e6d6a6ade55fd56

Contents?: true

Size: 1.51 KB

Versions: 255

Compression:

Stored size: 1.51 KB

Contents

var SpaceAge = require('./space-age');

describe('Space Age', function() {
  it('age in seconds', function() {
    var age = new SpaceAge(1000000);
    expect(age.seconds).toEqual(1000000);
  });

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

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

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

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

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

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

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

  xit('age in neptune year', function() {
    var age = new SpaceAge(8210123456);
    expect(age.onEarth()).toEqual(260.16);
    expect(age.onNeptune()).toEqual(1.58);
  });
});

Version data entries

255 entries across 255 versions & 1 rubygems

Version Path
trackler-2.2.1.37 tracks/javascript/exercises/space-age/space-age.spec.js
trackler-2.2.1.36 tracks/javascript/exercises/space-age/space-age.spec.js
trackler-2.2.1.35 tracks/javascript/exercises/space-age/space-age.spec.js
trackler-2.2.1.34 tracks/javascript/exercises/space-age/space-age.spec.js
trackler-2.2.1.33 tracks/javascript/exercises/space-age/space-age.spec.js
trackler-2.2.1.32 tracks/javascript/exercises/space-age/space-age.spec.js
trackler-2.2.1.31 tracks/javascript/exercises/space-age/space-age.spec.js
trackler-2.2.1.30 tracks/javascript/exercises/space-age/space-age.spec.js
trackler-2.2.1.29 tracks/javascript/exercises/space-age/space-age.spec.js
trackler-2.2.1.28 tracks/javascript/exercises/space-age/space-age.spec.js
trackler-2.2.1.27 tracks/javascript/exercises/space-age/space-age.spec.js
trackler-2.2.1.26 tracks/javascript/exercises/space-age/space-age.spec.js
trackler-2.2.1.25 tracks/javascript/exercises/space-age/space-age.spec.js
trackler-2.2.1.24 tracks/javascript/exercises/space-age/space-age.spec.js
trackler-2.2.1.23 tracks/javascript/exercises/space-age/space-age.spec.js
trackler-2.2.1.22 tracks/javascript/exercises/space-age/space-age.spec.js
trackler-2.2.1.21 tracks/javascript/exercises/space-age/space-age.spec.js
trackler-2.2.1.20 tracks/javascript/exercises/space-age/space-age.spec.js
trackler-2.2.1.19 tracks/javascript/exercises/space-age/space-age.spec.js
trackler-2.2.1.18 tracks/javascript/exercises/space-age/space-age.spec.js