Sha256: 45390b5b6fb4d2d566e35d4e569b138620b9b9d3b93fbdd0d59f2764064e274c
Contents?: true
Size: 1.15 KB
Versions: 68
Compression:
Stored size: 1.15 KB
Contents
import NucleotideCount from './nucleotide-count' describe('count all nucleotides in a strand', () => { it('empty strand', () => { const expected = { A: 0, C: 0, G: 0, T: 0 } expect(NucleotideCount.nucleotideCounts('')).toEqual(expected) }) xit('can count one nucleotide in single-character input', () => { const expected = { A: 0, C: 0, G: 1, T: 0 } expect(NucleotideCount.nucleotideCounts('G')).toEqual(expected) }) xit('strand with repeated nucleotide', () => { const expected = { A: 0, C: 0, G: 7, T: 0 } expect(NucleotideCount.nucleotideCounts('GGGGGGG')).toEqual(expected) }) xit('strand with multiple nucleotides', () => { const expected = { A: 20, C: 12, G: 17, T: 21 } expect(NucleotideCount.nucleotideCounts('AGCTTTTCATTCTGACTGCAACGGGCAATATGTCTCTGTGTGGATTAAAAAAAGAGTGTCTGATAGCAGC')).toEqual(expected) }) xit('strand with invalid nucleotides', () => { const expected = 'Invalid nucleotide in strand' expect(() => {NucleotideCount.nucleotideCounts('AGXXACT')}).toThrowError(expected) }) })
Version data entries
68 entries across 68 versions & 1 rubygems