( lang: string, filters: Filter = curriculumFilter // default to global curriculum filter, but allow override (e.g. when testing specific blocks) )
| 12 | const access = promisify(_access); |
| 13 | |
| 14 | export async function getChallengesForLang( |
| 15 | lang: string, |
| 16 | filters: Filter = curriculumFilter // default to global curriculum filter, but allow override (e.g. when testing specific blocks) |
| 17 | ) { |
| 18 | const invalidLang = !curriculumLangs.includes(lang); |
| 19 | if (invalidLang) |
| 20 | throw Error(`${lang} is not an accepted language. |
| 21 | Accepted languages are ${curriculumLangs.join(', ')}`); |
| 22 | |
| 23 | return buildCurriculum(lang, filters); |
| 24 | } |
| 25 | |
| 26 | export async function hasEnglishSource( |
| 27 | basePath: string, |
no test coverage detected