From 6028c2ee333f9d5aab39337ae29d00c729b9edc4 Mon Sep 17 00:00:00 2001 From: Isaac Good Date: Tue, 7 Jul 2026 23:44:56 -0700 Subject: [PATCH] Update the wordy proof to pass with node 24 --- exercises/practice/wordy/.meta/proof.ci.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/exercises/practice/wordy/.meta/proof.ci.ts b/exercises/practice/wordy/.meta/proof.ci.ts index 260fa29bb..0f88d9ffd 100644 --- a/exercises/practice/wordy/.meta/proof.ci.ts +++ b/exercises/practice/wordy/.meta/proof.ci.ts @@ -12,6 +12,8 @@ const compute = ( return operand1 / operand2 case 'multiplied by': return operand1 * operand2 + default: + throw new Error('Unknown operation') } } @@ -32,6 +34,9 @@ export const answer = (question: string): number => { const operations = question.match(operationsPattern) const operands = question.match(/-?\d+/g) + if (!operands) { + throw new Error('Syntax error') + } let result = parseInt(operands[0])