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.119 tracks/coffeescript/exercises/nucleotide-count/nucleotide-count_test.spec.coffee
trackler-2.2.1.118 tracks/coffeescript/exercises/nucleotide-count/nucleotide-count_test.spec.coffee
trackler-2.2.1.117 tracks/coffeescript/exercises/nucleotide-count/nucleotide-count_test.spec.coffee
trackler-2.2.1.116 tracks/coffeescript/exercises/nucleotide-count/nucleotide-count_test.spec.coffee
trackler-2.2.1.115 tracks/coffeescript/exercises/nucleotide-count/nucleotide-count_test.spec.coffee
trackler-2.2.1.114 tracks/coffeescript/exercises/nucleotide-count/nucleotide-count_test.spec.coffee
trackler-2.2.1.113 tracks/coffeescript/exercises/nucleotide-count/nucleotide-count_test.spec.coffee
trackler-2.2.1.111 tracks/coffeescript/exercises/nucleotide-count/nucleotide-count_test.spec.coffee
trackler-2.2.1.110 tracks/coffeescript/exercises/nucleotide-count/nucleotide-count_test.spec.coffee
trackler-2.2.1.109 tracks/coffeescript/exercises/nucleotide-count/nucleotide-count_test.spec.coffee
trackler-2.2.1.108 tracks/coffeescript/exercises/nucleotide-count/nucleotide-count_test.spec.coffee
trackler-2.2.1.107 tracks/coffeescript/exercises/nucleotide-count/nucleotide-count_test.spec.coffee
trackler-2.2.1.106 tracks/coffeescript/exercises/nucleotide-count/nucleotide-count_test.spec.coffee
trackler-2.2.1.105 tracks/coffeescript/exercises/nucleotide-count/nucleotide-count_test.spec.coffee
trackler-2.2.1.104 tracks/coffeescript/exercises/nucleotide-count/nucleotide-count_test.spec.coffee
trackler-2.2.1.103 tracks/coffeescript/exercises/nucleotide-count/nucleotide-count_test.spec.coffee
trackler-2.2.1.102 tracks/coffeescript/exercises/nucleotide-count/nucleotide-count_test.spec.coffee
trackler-2.2.1.101 tracks/coffeescript/exercises/nucleotide-count/nucleotide-count_test.spec.coffee
trackler-2.2.1.100 tracks/coffeescript/exercises/nucleotide-count/nucleotide-count_test.spec.coffee
trackler-2.2.1.99 tracks/coffeescript/exercises/nucleotide-count/nucleotide-count_test.spec.coffee