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

Version Path
trackler-2.2.1.180 tracks/typescript/exercises/rna-transcription/rna-transcription.test.ts
trackler-2.2.1.179 tracks/typescript/exercises/rna-transcription/rna-transcription.test.ts
trackler-2.2.1.178 tracks/typescript/exercises/rna-transcription/rna-transcription.test.ts
trackler-2.2.1.177 tracks/typescript/exercises/rna-transcription/rna-transcription.test.ts
trackler-2.2.1.176 tracks/typescript/exercises/rna-transcription/rna-transcription.test.ts
trackler-2.2.1.175 tracks/typescript/exercises/rna-transcription/rna-transcription.test.ts
trackler-2.2.1.174 tracks/typescript/exercises/rna-transcription/rna-transcription.test.ts
trackler-2.2.1.173 tracks/typescript/exercises/rna-transcription/rna-transcription.test.ts
trackler-2.2.1.172 tracks/typescript/exercises/rna-transcription/rna-transcription.test.ts
trackler-2.2.1.171 tracks/typescript/exercises/rna-transcription/rna-transcription.test.ts
trackler-2.2.1.170 tracks/typescript/exercises/rna-transcription/rna-transcription.test.ts
trackler-2.2.1.169 tracks/typescript/exercises/rna-transcription/rna-transcription.test.ts
trackler-2.2.1.167 tracks/typescript/exercises/rna-transcription/rna-transcription.test.ts
trackler-2.2.1.166 tracks/typescript/exercises/rna-transcription/rna-transcription.test.ts
trackler-2.2.1.165 tracks/typescript/exercises/rna-transcription/rna-transcription.test.ts
trackler-2.2.1.164 tracks/typescript/exercises/rna-transcription/rna-transcription.test.ts
trackler-2.2.1.163 tracks/typescript/exercises/rna-transcription/rna-transcription.test.ts
trackler-2.2.1.162 tracks/typescript/exercises/rna-transcription/rna-transcription.test.ts
trackler-2.2.1.161 tracks/typescript/exercises/rna-transcription/rna-transcription.test.ts
trackler-2.2.1.160 tracks/typescript/exercises/rna-transcription/rna-transcription.test.ts