Sha256: 0937b74ed24b497d1b734f6b7cd030728aa0f8589be027625bbd2b0ad0f65b72

Contents?: true

Size: 1.59 KB

Versions: 172

Compression:

Stored size: 1.59 KB

Contents

import Pangram from './pangram'

describe('Pangram()', () => {

  it('empty sentence', () => {
    const pangram = new Pangram('')
    expect(pangram.isPangram()).toBe(false)
  })

  xit('pangram with only lower case', () => {
    const pangram = new Pangram("the quick brown fox jumps over the lazy dog")
    expect(pangram.isPangram()).toBe(true)
  })

  xit("missing character 'x'", () => {
    const pangram = new Pangram("a quick movement of the enemy will jeopardize five gunboats")
    expect(pangram.isPangram()).toBe(false)
  })

  xit("another missing character 'x'", () => {
    const pangram = new Pangram("the quick brown fish jumps over the lazy dog")
    expect(pangram.isPangram()).toBe(false)
  })

  xit("pangram with underscores", () => {
    const pangram = new Pangram("the_quick_brown_fox_jumps_over_the_lazy_dog")
    expect(pangram.isPangram()).toBe(true)
  })

  xit("pangram with numbers", () => {
    const pangram = new Pangram("the 1 quick brown fox jumps over the 2 lazy dogs")
    expect(pangram.isPangram()).toBe(true)
  })

  xit('missing letters replaced by numbers', () => {
    const pangram = new Pangram("7h3 qu1ck brown fox jumps ov3r 7h3 lazy dog")
    expect(pangram.isPangram()).toBe(false)
  })

  xit('pangram with mixed case and punctuation', () => {
    const pangram = new Pangram("\"Five quacking Zephyrs jolt my wax bed.\"")
    expect(pangram.isPangram()).toBe(true)
  })

  xit('pangram with non-ascii characters', () => {
    const pangram = new Pangram("Victor jagt zwölf Boxkämpfer quer über den großen Sylter Deich.")
    expect(pangram.isPangram()).toBe(true)
  })

})

Version data entries

172 entries across 172 versions & 1 rubygems

Version Path
trackler-2.2.1.127 tracks/typescript/exercises/pangram/pangram.test.ts
trackler-2.2.1.126 tracks/typescript/exercises/pangram/pangram.test.ts
trackler-2.2.1.125 tracks/typescript/exercises/pangram/pangram.test.ts
trackler-2.2.1.124 tracks/typescript/exercises/pangram/pangram.test.ts
trackler-2.2.1.123 tracks/typescript/exercises/pangram/pangram.test.ts
trackler-2.2.1.122 tracks/typescript/exercises/pangram/pangram.test.ts
trackler-2.2.1.121 tracks/typescript/exercises/pangram/pangram.test.ts
trackler-2.2.1.120 tracks/typescript/exercises/pangram/pangram.test.ts
trackler-2.2.1.119 tracks/typescript/exercises/pangram/pangram.test.ts
trackler-2.2.1.118 tracks/typescript/exercises/pangram/pangram.test.ts
trackler-2.2.1.117 tracks/typescript/exercises/pangram/pangram.test.ts
trackler-2.2.1.116 tracks/typescript/exercises/pangram/pangram.test.ts
trackler-2.2.1.115 tracks/typescript/exercises/pangram/pangram.test.ts
trackler-2.2.1.114 tracks/typescript/exercises/pangram/pangram.test.ts
trackler-2.2.1.113 tracks/typescript/exercises/pangram/pangram.test.ts
trackler-2.2.1.111 tracks/typescript/exercises/pangram/pangram.test.ts
trackler-2.2.1.110 tracks/typescript/exercises/pangram/pangram.test.ts
trackler-2.2.1.109 tracks/typescript/exercises/pangram/pangram.test.ts
trackler-2.2.1.108 tracks/typescript/exercises/pangram/pangram.test.ts
trackler-2.2.1.107 tracks/typescript/exercises/pangram/pangram.test.ts