Skip to content

Commit 7a5838a

Browse files
committed
Update test naming logic for single codons
1 parent 8c287ae commit 7a5838a

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

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

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,11 @@ describe('ProteinTranslation', () => {
2020
mapping.forEach(([protein, codons]) => {
2121
codons.forEach((codon, index) => {
2222
const seq = index + 1;
23-
xtest(`${protein} RNA sequence ${seq} translates into ${protein}`, () => {
23+
const message =
24+
codons.length == 1
25+
? `${protein} RNA sequence`
26+
: `${protein} RNA sequence ${seq}`;
27+
xtest(message, () => {
2428
expect(translate(codon)).toEqual([protein]);
2529
});
2630
});

0 commit comments

Comments
 (0)