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.180 tracks/coffeescript/exercises/nucleotide-count/nucleotide-count_test.spec.coffee
trackler-2.2.1.179 tracks/coffeescript/exercises/nucleotide-count/nucleotide-count_test.spec.coffee
trackler-2.2.1.178 tracks/coffeescript/exercises/nucleotide-count/nucleotide-count_test.spec.coffee
trackler-2.2.1.177 tracks/coffeescript/exercises/nucleotide-count/nucleotide-count_test.spec.coffee
trackler-2.2.1.176 tracks/coffeescript/exercises/nucleotide-count/nucleotide-count_test.spec.coffee
trackler-2.2.1.175 tracks/coffeescript/exercises/nucleotide-count/nucleotide-count_test.spec.coffee
trackler-2.2.1.174 tracks/coffeescript/exercises/nucleotide-count/nucleotide-count_test.spec.coffee
trackler-2.2.1.173 tracks/coffeescript/exercises/nucleotide-count/nucleotide-count_test.spec.coffee
trackler-2.2.1.172 tracks/coffeescript/exercises/nucleotide-count/nucleotide-count_test.spec.coffee
trackler-2.2.1.171 tracks/coffeescript/exercises/nucleotide-count/nucleotide-count_test.spec.coffee
trackler-2.2.1.170 tracks/coffeescript/exercises/nucleotide-count/nucleotide-count_test.spec.coffee
trackler-2.2.1.169 tracks/coffeescript/exercises/nucleotide-count/nucleotide-count_test.spec.coffee
trackler-2.2.1.167 tracks/coffeescript/exercises/nucleotide-count/nucleotide-count_test.spec.coffee
trackler-2.2.1.166 tracks/coffeescript/exercises/nucleotide-count/nucleotide-count_test.spec.coffee
trackler-2.2.1.165 tracks/coffeescript/exercises/nucleotide-count/nucleotide-count_test.spec.coffee
trackler-2.2.1.164 tracks/coffeescript/exercises/nucleotide-count/nucleotide-count_test.spec.coffee
trackler-2.2.1.163 tracks/coffeescript/exercises/nucleotide-count/nucleotide-count_test.spec.coffee
trackler-2.2.1.162 tracks/coffeescript/exercises/nucleotide-count/nucleotide-count_test.spec.coffee
trackler-2.2.1.161 tracks/coffeescript/exercises/nucleotide-count/nucleotide-count_test.spec.coffee
trackler-2.2.1.160 tracks/coffeescript/exercises/nucleotide-count/nucleotide-count_test.spec.coffee