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.159 tracks/typescript/exercises/rna-transcription/rna-transcription.test.ts
trackler-2.2.1.158 tracks/typescript/exercises/rna-transcription/rna-transcription.test.ts
trackler-2.2.1.157 tracks/typescript/exercises/rna-transcription/rna-transcription.test.ts
trackler-2.2.1.156 tracks/typescript/exercises/rna-transcription/rna-transcription.test.ts
trackler-2.2.1.155 tracks/typescript/exercises/rna-transcription/rna-transcription.test.ts
trackler-2.2.1.154 tracks/typescript/exercises/rna-transcription/rna-transcription.test.ts
trackler-2.2.1.153 tracks/typescript/exercises/rna-transcription/rna-transcription.test.ts
trackler-2.2.1.152 tracks/typescript/exercises/rna-transcription/rna-transcription.test.ts
trackler-2.2.1.151 tracks/typescript/exercises/rna-transcription/rna-transcription.test.ts
trackler-2.2.1.150 tracks/typescript/exercises/rna-transcription/rna-transcription.test.ts
trackler-2.2.1.149 tracks/typescript/exercises/rna-transcription/rna-transcription.test.ts
trackler-2.2.1.148 tracks/typescript/exercises/rna-transcription/rna-transcription.test.ts
trackler-2.2.1.147 tracks/typescript/exercises/rna-transcription/rna-transcription.test.ts
trackler-2.2.1.146 tracks/typescript/exercises/rna-transcription/rna-transcription.test.ts
trackler-2.2.1.145 tracks/typescript/exercises/rna-transcription/rna-transcription.test.ts
trackler-2.2.1.144 tracks/typescript/exercises/rna-transcription/rna-transcription.test.ts
trackler-2.2.1.143 tracks/typescript/exercises/rna-transcription/rna-transcription.test.ts
trackler-2.2.1.142 tracks/typescript/exercises/rna-transcription/rna-transcription.test.ts
trackler-2.2.1.141 tracks/typescript/exercises/rna-transcription/rna-transcription.test.ts
trackler-2.2.1.140 tracks/typescript/exercises/rna-transcription/rna-transcription.test.ts