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

Version Path
trackler-2.1.0.53 tracks/ecmascript/exercises/rna-transcription/rna-transcription.spec.js
trackler-2.1.0.52 tracks/ecmascript/exercises/rna-transcription/rna-transcription.spec.js
trackler-2.1.0.51 tracks/ecmascript/exercises/rna-transcription/rna-transcription.spec.js
trackler-2.1.0.50 tracks/ecmascript/exercises/rna-transcription/rna-transcription.spec.js
trackler-2.1.0.49 tracks/ecmascript/exercises/rna-transcription/rna-transcription.spec.js
trackler-2.1.0.48 tracks/ecmascript/exercises/rna-transcription/rna-transcription.spec.js
trackler-2.1.0.47 tracks/ecmascript/exercises/rna-transcription/rna-transcription.spec.js
trackler-2.1.0.46 tracks/ecmascript/exercises/rna-transcription/rna-transcription.spec.js
trackler-2.1.0.45 tracks/ecmascript/exercises/rna-transcription/rna-transcription.spec.js
trackler-2.1.0.44 tracks/ecmascript/exercises/rna-transcription/rna-transcription.spec.js
trackler-2.1.0.43 tracks/ecmascript/exercises/rna-transcription/rna-transcription.spec.js
trackler-2.1.0.42 tracks/ecmascript/exercises/rna-transcription/rna-transcription.spec.js
trackler-2.1.0.41 tracks/ecmascript/exercises/rna-transcription/rna-transcription.spec.js
trackler-2.1.0.40 tracks/ecmascript/exercises/rna-transcription/rna-transcription.spec.js
trackler-2.1.0.39 tracks/ecmascript/exercises/rna-transcription/rna-transcription.spec.js
trackler-2.1.0.38 tracks/ecmascript/exercises/rna-transcription/rna-transcription.spec.js
trackler-2.1.0.37 tracks/ecmascript/exercises/rna-transcription/rna-transcription.spec.js
trackler-2.1.0.36 tracks/ecmascript/exercises/rna-transcription/rna-transcription.spec.js
trackler-2.1.0.34 tracks/ecmascript/exercises/rna-transcription/rna-transcription.spec.js
trackler-2.1.0.33 tracks/ecmascript/exercises/rna-transcription/rna-transcription.spec.js