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