From ee8e7504937a4cf2b2e27ce2fb830c7ff29b58ae Mon Sep 17 00:00:00 2001 From: Nithyakala Rajendran Date: Fri, 19 Sep 2025 17:13:39 -0700 Subject: [PATCH] fix(tools): typo in error message (#62208) Co-authored-by: Huyen Nguyen <25715018+huyenltnguyen@users.noreply.github.com> --- curriculum/get-challenges.js | 2 +- curriculum/get-challenges.test.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/curriculum/get-challenges.js b/curriculum/get-challenges.js index 72554bea10d..9ea921565c5 100644 --- a/curriculum/get-challenges.js +++ b/curriculum/get-challenges.js @@ -14,7 +14,7 @@ exports.getChallengesForLang = async function getChallengesForLang( ) { const invalidLang = !curriculumLangs.includes(lang); if (invalidLang) - throw Error(`${lang} is not a accepted language. + throw Error(`${lang} is not an accepted language. Accepted languages are ${curriculumLangs.join(', ')}`); return buildCurriculum(lang, filters); diff --git a/curriculum/get-challenges.test.js b/curriculum/get-challenges.test.js index a848b4023d0..30eb6cdcca9 100644 --- a/curriculum/get-challenges.test.js +++ b/curriculum/get-challenges.test.js @@ -11,7 +11,7 @@ describe('create non-English challenge', () => { describe('getChallengesForLang', () => { it('throws if lang is an invalid language', async () => { await expect(() => getChallengesForLang('notlang')).rejects.toThrow( - 'notlang is not a accepted language' + 'notlang is not an accepted language' ); }); });