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.32 tracks/ecmascript/exercises/rna-transcription/rna-transcription.spec.js
trackler-2.1.0.31 tracks/ecmascript/exercises/rna-transcription/rna-transcription.spec.js
trackler-2.1.0.30 tracks/ecmascript/exercises/rna-transcription/rna-transcription.spec.js
trackler-2.1.0.29 tracks/ecmascript/exercises/rna-transcription/rna-transcription.spec.js
trackler-2.1.0.28 tracks/ecmascript/exercises/rna-transcription/rna-transcription.spec.js
trackler-2.1.0.27 tracks/ecmascript/exercises/rna-transcription/rna-transcription.spec.js
trackler-2.1.0.26 tracks/ecmascript/exercises/rna-transcription/rna-transcription.spec.js
trackler-2.1.0.25 tracks/ecmascript/exercises/rna-transcription/rna-transcription.spec.js
trackler-2.1.0.24 tracks/ecmascript/exercises/rna-transcription/rna-transcription.spec.js
trackler-2.1.0.23 tracks/ecmascript/exercises/rna-transcription/rna-transcription.spec.js
trackler-2.1.0.22 tracks/ecmascript/exercises/rna-transcription/rna-transcription.spec.js
trackler-2.1.0.21 tracks/ecmascript/exercises/rna-transcription/rna-transcription.spec.js
trackler-2.1.0.20 tracks/ecmascript/exercises/rna-transcription/rna-transcription.spec.js
trackler-2.1.0.19 tracks/ecmascript/exercises/rna-transcription/rna-transcription.spec.js
trackler-2.1.0.18 tracks/ecmascript/exercises/rna-transcription/rna-transcription.spec.js
trackler-2.1.0.17 tracks/ecmascript/exercises/rna-transcription/rna-transcription.spec.js
trackler-2.1.0.16 tracks/ecmascript/exercises/rna-transcription/rna-transcription.spec.js
trackler-2.1.0.15 tracks/ecmascript/exercises/rna-transcription/rna-transcription.spec.js
trackler-2.1.0.14 tracks/ecmascript/exercises/rna-transcription/rna-transcription.spec.js
trackler-2.1.0.13 tracks/ecmascript/exercises/rna-transcription/rna-transcription.spec.js