Sha256: d0aea44f11978f8b4793b3dd2709b117016c986954cafefd27c614b55517a483
Contents?: true
Size: 1.14 KB
Versions: 224
Compression:
Stored size: 1.14 KB
Contents
import Transcriptor from './rna-transcription' describe('Transcriptor', () => { const transcriptor = new Transcriptor() it('transcribes cytosine to guanine', () => { expect(transcriptor.toRna('C')).toEqual('G') }) xit('transcribes guanine to cytosine', () => { expect(transcriptor.toRna('G')).toEqual('C') }) xit('transcribes adenine to uracil', () => { expect(transcriptor.toRna('A')).toEqual('U') }) xit('transcribes thymine to adenine', () => { expect(transcriptor.toRna('T')).toEqual('A') }) xit('transcribes all dna nucleotides to their rna complements', () => { expect(transcriptor.toRna('ACGTGGTCTTAA')) .toEqual('UGCACCAGAAUU') }) xit('correctly handles invalid input', () => { expect(() => transcriptor.toRna('U')).toThrowError( 'Invalid input DNA.' ) }) xit('correctly handles completely invalid input', () => { expect(() => transcriptor.toRna('XXX')).toThrowError( 'Invalid input DNA.' ) }) xit('correctly handles partially invalid input', () => { expect(() => transcriptor.toRna('ACGTXXXCTTAA')).toThrowError( 'Invalid input DNA.' ) }) })
Version data entries
224 entries across 224 versions & 1 rubygems