Sha256: 80fb7e5b0599521a4bf909c94611472ece0b901dc1face295c5f28462ca8c5cf

Contents?: true

Size: 1.18 KB

Versions: 396

Compression:

Stored size: 1.18 KB

Contents

DNA = require './example'

describe 'DNA', ->
  it 'has no nucleotides', ->
    expected =
      A: 0
      T: 0
      C: 0
      G: 0
    dna = new DNA('')
    expect(dna.nucleotideCounts).toEqual expected

  xit 'has no adoenosine', ->
    dna = new DNA('')
    expect(dna.count('A')).toEqual 0

  xit 'repetitive cytidine gets counts', ->
    dna = new DNA('CCCCC')
    expect(dna.count('C')).toEqual 5

  xit 'repetitive sequence has only gaunosine', ->
    dna = new DNA('GGGGGGGG')
    expected =
      A: 0
      T: 0
      C: 0
      G: 8
    expect(dna.nucleotideCounts).toEqual expected

  xit 'counts only thymidine', ->
    dna = new DNA('GGGGTAACCCGG')
    expect(dna.count('T')).toEqual 1

  xit 'counts a nucleotide only once', ->
    dna = new DNA('GGTTGG')
    dna.count('T')
    expect(dna.count('T')).toEqual 2

  xit 'validates nucleotides', ->
    dna = new DNA('GGTTGG')
    expect ->
      dna.count 'X'
    .toThrow new Error('Invalid Nucleotide')

  xit 'counts all nucleotides', ->
    dna = new DNA('AGCTTTTCATTCTGACTGCAACGGGCAATATGTCTCTGTGTGGATTAAAAAAAGAGTGTCTGATAGCAGC')
    expected =
      A: 20
      T: 21
      G: 17
      C: 12
    expect(dna.nucleotideCounts).toEqual expected

Version data entries

396 entries across 396 versions & 1 rubygems

Version Path
trackler-2.2.1.98 tracks/coffeescript/exercises/nucleotide-count/nucleotide-count_test.spec.coffee
trackler-2.2.1.97 tracks/coffeescript/exercises/nucleotide-count/nucleotide-count_test.spec.coffee
trackler-2.2.1.96 tracks/coffeescript/exercises/nucleotide-count/nucleotide-count_test.spec.coffee
trackler-2.2.1.95 tracks/coffeescript/exercises/nucleotide-count/nucleotide-count_test.spec.coffee
trackler-2.2.1.94 tracks/coffeescript/exercises/nucleotide-count/nucleotide-count_test.spec.coffee
trackler-2.2.1.93 tracks/coffeescript/exercises/nucleotide-count/nucleotide-count_test.spec.coffee
trackler-2.2.1.92 tracks/coffeescript/exercises/nucleotide-count/nucleotide-count_test.spec.coffee
trackler-2.2.1.91 tracks/coffeescript/exercises/nucleotide-count/nucleotide-count_test.spec.coffee
trackler-2.2.1.90 tracks/coffeescript/exercises/nucleotide-count/nucleotide-count_test.spec.coffee
trackler-2.2.1.89 tracks/coffeescript/exercises/nucleotide-count/nucleotide-count_test.spec.coffee
trackler-2.2.1.88 tracks/coffeescript/exercises/nucleotide-count/nucleotide-count_test.spec.coffee
trackler-2.2.1.87 tracks/coffeescript/exercises/nucleotide-count/nucleotide-count_test.spec.coffee
trackler-2.2.1.86 tracks/coffeescript/exercises/nucleotide-count/nucleotide-count_test.spec.coffee
trackler-2.2.1.85 tracks/coffeescript/exercises/nucleotide-count/nucleotide-count_test.spec.coffee
trackler-2.2.1.84 tracks/coffeescript/exercises/nucleotide-count/nucleotide-count_test.spec.coffee
trackler-2.2.1.83 tracks/coffeescript/exercises/nucleotide-count/nucleotide-count_test.spec.coffee
trackler-2.2.1.82 tracks/coffeescript/exercises/nucleotide-count/nucleotide-count_test.spec.coffee
trackler-2.2.1.81 tracks/coffeescript/exercises/nucleotide-count/nucleotide-count_test.spec.coffee
trackler-2.2.1.80 tracks/coffeescript/exercises/nucleotide-count/nucleotide-count_test.spec.coffee
trackler-2.2.1.79 tracks/coffeescript/exercises/nucleotide-count/nucleotide-count_test.spec.coffee