Sha256: f3414e2db8e7599a9a765737482676f47122f8f04158fe26a7612ab37613d438
Contents?: true
Size: 1.17 KB
Versions: 180
Compression:
Stored size: 1.17 KB
Contents
import Transcriptor from './rna-transcription'; describe('Transcriptor', () => { let 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')).toThrow( new Error('Invalid input DNA.') ); }); xit('correctly handles completely invalid input', () => { expect(() => transcriptor.toRna('XXX')).toThrow( new Error('Invalid input DNA.') ); }); xit('correctly handles partially invalid input', () => { expect(() => transcriptor.toRna('ACGTXXXCTTAA')).toThrow( new Error('Invalid input DNA.') ); }); });
Version data entries
180 entries across 180 versions & 1 rubygems