rna-transcription/rna-transcription.spec.js   A
last analyzed

Complexity

Total Complexity 7
Complexity/F 1

Size

Lines of Code 27
Function Count 7

Duplication

Duplicated Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
wmc 7
eloc 14
mnd 0
bc 0
fnc 7
dl 0
loc 27
bpm 0
cpm 1
noi 0
c 0
b 0
f 0
rs 10
1
import { toRna } from './rna-transcription'
2
3
describe('Transcription', () => {
4
  test('empty rna sequence', () => {
5
    expect(toRna('')).toEqual('');
6
  });
7
8
  test('transcribes cytosine to guanine', () => {
9
    expect(toRna('C')).toEqual('G');
10
  });
11
12
  test('transcribes guanine to cytosine', () => {
13
    expect(toRna('G')).toEqual('C');
14
  });
15
16
  test('transcribes thymine to adenine', () => {
17
    expect(toRna('T')).toEqual('A');
18
  });
19
20
 test('transcribes adenine to uracil', () => {
21
    expect(toRna('A')).toEqual('U');
22
  });
23
24
  test('transcribes all dna nucleotides to their rna complements', () => {
25
    expect(toRna('ACGTGGTCTTAA')).toEqual('UGCACCAGAAUU');
26
  });
27
})
28