Sha256: 2392df9f1938d7a06fe73205e69235f7815e94c631f64608d15484a14eb64884

Contents?: true

Size: 1.28 KB

Versions: 255

Compression:

Stored size: 1.28 KB

Contents

var Year = require('./leap');

describe('Leap year', function() {

  it('is not very common', function() {
    var year = new Year(2015);
    expect(year.isLeap()).toBe(false);
  });

  xit('is introduced every 4 years to adjust about a day', function() {
    var year = new Year(2016);
    expect(year.isLeap()).toBe(true);
  });

  xit('is skipped every 100 years to remove an extra day', function() {
    var year = new Year(1900);
    expect(year.isLeap()).toBe(false);
  });

  xit('is reintroduced every 400 years to adjust another day', function() {
    var year = new Year(2000);
    expect(year.isLeap()).toBe(true);
  });

  // Feel free to enable the following tests to check some more examples
  xdescribe('Additional example of a leap year that', function () {

    it('is not a leap year', function () {
      var year = new Year(1978);
      expect(year.isLeap()).toBe(false);
    });

    it('is a common leap year', function () {
      var year = new Year(1992);
      expect(year.isLeap()).toBe(true);
    });

    it('is skipped every 100 years', function () {
      var year = new Year(2100);
      expect(year.isLeap()).toBe(false);
    });

    it('is reintroduced every 400 years', function () {
      var year = new Year(2400);
      expect(year.isLeap()).toBe(true);
    });

  });

});

Version data entries

255 entries across 255 versions & 1 rubygems

Version Path
trackler-2.1.0.40 tracks/javascript/exercises/leap/leap.spec.js
trackler-2.1.0.39 tracks/javascript/exercises/leap/leap.spec.js
trackler-2.1.0.38 tracks/javascript/exercises/leap/leap.spec.js
trackler-2.1.0.37 tracks/javascript/exercises/leap/leap.spec.js
trackler-2.1.0.36 tracks/javascript/exercises/leap/leap.spec.js
trackler-2.1.0.34 tracks/javascript/exercises/leap/leap.spec.js
trackler-2.1.0.33 tracks/javascript/exercises/leap/leap.spec.js
trackler-2.1.0.32 tracks/javascript/exercises/leap/leap.spec.js
trackler-2.1.0.31 tracks/javascript/exercises/leap/leap.spec.js
trackler-2.1.0.30 tracks/javascript/exercises/leap/leap.spec.js
trackler-2.1.0.29 tracks/javascript/exercises/leap/leap.spec.js
trackler-2.1.0.28 tracks/javascript/exercises/leap/leap.spec.js
trackler-2.1.0.27 tracks/javascript/exercises/leap/leap.spec.js
trackler-2.1.0.26 tracks/javascript/exercises/leap/leap.spec.js
trackler-2.1.0.25 tracks/javascript/exercises/leap/leap.spec.js
trackler-2.1.0.24 tracks/javascript/exercises/leap/leap.spec.js
trackler-2.1.0.23 tracks/javascript/exercises/leap/leap.spec.js
trackler-2.1.0.22 tracks/javascript/exercises/leap/leap.spec.js
trackler-2.1.0.21 tracks/javascript/exercises/leap/leap.spec.js
trackler-2.1.0.20 tracks/javascript/exercises/leap/leap.spec.js