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.139 tracks/typescript/exercises/rna-transcription/rna-transcription.test.ts
trackler-2.2.1.138 tracks/typescript/exercises/rna-transcription/rna-transcription.test.ts
trackler-2.2.1.137 tracks/typescript/exercises/rna-transcription/rna-transcription.test.ts
trackler-2.2.1.136 tracks/typescript/exercises/rna-transcription/rna-transcription.test.ts
trackler-2.2.1.135 tracks/typescript/exercises/rna-transcription/rna-transcription.test.ts
trackler-2.2.1.134 tracks/typescript/exercises/rna-transcription/rna-transcription.test.ts
trackler-2.2.1.133 tracks/typescript/exercises/rna-transcription/rna-transcription.test.ts
trackler-2.2.1.132 tracks/typescript/exercises/rna-transcription/rna-transcription.test.ts
trackler-2.2.1.131 tracks/typescript/exercises/rna-transcription/rna-transcription.test.ts
trackler-2.2.1.130 tracks/typescript/exercises/rna-transcription/rna-transcription.test.ts
trackler-2.2.1.129 tracks/typescript/exercises/rna-transcription/rna-transcription.test.ts
trackler-2.2.1.128 tracks/typescript/exercises/rna-transcription/rna-transcription.test.ts
trackler-2.2.1.127 tracks/typescript/exercises/rna-transcription/rna-transcription.test.ts
trackler-2.2.1.126 tracks/typescript/exercises/rna-transcription/rna-transcription.test.ts
trackler-2.2.1.125 tracks/typescript/exercises/rna-transcription/rna-transcription.test.ts
trackler-2.2.1.124 tracks/typescript/exercises/rna-transcription/rna-transcription.test.ts
trackler-2.2.1.123 tracks/typescript/exercises/rna-transcription/rna-transcription.test.ts
trackler-2.2.1.122 tracks/typescript/exercises/rna-transcription/rna-transcription.test.ts
trackler-2.2.1.121 tracks/typescript/exercises/rna-transcription/rna-transcription.test.ts
trackler-2.2.1.120 tracks/typescript/exercises/rna-transcription/rna-transcription.test.ts