Sha256: 99e0107098aaebc8c45fb24bf20e9742f693a575a94f10a7f0074d10e7af5b80

Contents?: true

Size: 940 Bytes

Versions: 71

Compression:

Stored size: 940 Bytes

Contents

import isLeapYear from './leap'

describe('A leap year', () => {

  it('is not very common', () => {
    expect(isLeapYear(2015)).toBeFalsy()
  })

  it('is introduced every 4 years to adjust about a day', () => {
    expect(isLeapYear(2016)).toBeTruthy()
  })

  it('is skipped every 100 years to remove an extra day', () => {
    expect(isLeapYear(1900)).toBeFalsy()
  })

  it('is reintroduced every 400 years to adjust another day', () => {
    expect(isLeapYear(2000)).toBeTruthy()
  })

  describe('Additional example of a leap year that', () => {

    it('is not a leap year', () => {
      expect(isLeapYear(1978)).toBeFalsy()
    })

    it('is a common leap year', () => {
      expect(isLeapYear(1992)).toBeTruthy()
    })

    it('is skipped every 100 years', () => {
      expect(isLeapYear(2100)).toBeFalsy()
    })

    it('is reintroduced every 400 years', () => {
      expect(isLeapYear(2400)).toBeTruthy()
    })
  })
})

Version data entries

71 entries across 71 versions & 1 rubygems

Version Path
trackler-2.1.0.16 tracks/typescript/exercises/leap/leap.test.ts
trackler-2.1.0.15 tracks/typescript/exercises/leap/leap.test.ts
trackler-2.1.0.14 tracks/typescript/exercises/leap/leap.test.ts
trackler-2.1.0.13 tracks/typescript/exercises/leap/leap.test.ts
trackler-2.1.0.12 tracks/typescript/exercises/leap/leap.test.ts
trackler-2.1.0.11 tracks/typescript/exercises/leap/leap.test.ts
trackler-2.1.0.10 tracks/typescript/exercises/leap/leap.test.ts
trackler-2.1.0.9 tracks/typescript/exercises/leap/leap.test.ts
trackler-2.1.0.8 tracks/typescript/exercises/leap/leap.test.ts
trackler-2.1.0.7 tracks/typescript/exercises/leap/leap.test.ts
trackler-2.1.0.6 tracks/typescript/exercises/leap/leap.test.ts
trackler-2.1.0.5 tracks/typescript/exercises/leap/leap.test.ts
trackler-2.1.0.4 tracks/typescript/exercises/leap/leap.test.ts
trackler-2.1.0.3 tracks/typescript/exercises/leap/leap.test.ts
trackler-2.1.0.2 tracks/typescript/exercises/leap/leap.test.ts
trackler-2.1.0.1 tracks/typescript/exercises/leap/leap.test.ts
trackler-2.1.0.0 tracks/typescript/exercises/leap/leap.test.ts
trackler-2.0.8.55 tracks/typescript/exercises/leap/leap.test.ts
trackler-2.0.8.54 tracks/typescript/exercises/leap/leap.test.ts
trackler-2.0.8.53 tracks/typescript/exercises/leap/leap.test.ts