Skip to content

Commit 57466b9

Browse files
committed
Update test file
1 parent 141d9d4 commit 57466b9

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

exercises/practice/protein-translation/protein-translation.spec.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { describe, expect, test, xtest } from '@jest/globals';
22
import { translate } from './protein-translation';
33

44
describe('ProteinTranslation', () => {
5-
test('Empty RNA has no proteins', () => {
5+
test('Empty RNA sequence results in no proteins', () => {
66
expect(translate()).toEqual([]);
77
});
88

@@ -71,13 +71,13 @@ describe('ProteinTranslation', () => {
7171
'Tyrosine',
7272
]);
7373
});
74-
});
7574

76-
describe('Unexpected strands', () => {
77-
xtest("Non-existing codon can't translate", () => {
78-
expect(() => translate('AAA')).toThrow(new Error('Invalid codon'));
75+
xtest('Sequence of two non-STOP codons does not translate to a STOP codon', () => {
76+
expect(translate('AUGAUG')).toEqual(['Methionine', 'Methionine']);
7977
});
78+
});
8079

80+
describe('Unexpected strands', () => {
8181
xtest("Unknown amino acids, not part of a codon, can't translate", () => {
8282
expect(() => translate('XYZ')).toThrow(new Error('Invalid codon'));
8383
});

0 commit comments

Comments
 (0)