mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-05-28 18:26:54 +00:00
fix: helpful error if solution missing (#52603)
This commit is contained in:
committed by
GitHub
parent
b7b6cacdd8
commit
7630389829
@@ -466,6 +466,22 @@ function populateTestsForLang({ lang, challenges, meta }) {
|
||||
|
||||
if (nextChallenge) {
|
||||
const solutionFiles = cloneDeep(nextChallenge.challengeFiles);
|
||||
if (!solutionFiles) {
|
||||
throw Error(
|
||||
`No solution found.
|
||||
Check the next challenge (${nextChallenge.title}): it should have a seed which solves the current challenge.
|
||||
For example:
|
||||
|
||||
# --seed--
|
||||
|
||||
## --seed-contents--
|
||||
|
||||
\`\`\`js
|
||||
seed goes here
|
||||
\`\`\`
|
||||
`
|
||||
);
|
||||
}
|
||||
const solutionFilesWithEditableContents = solutionFiles.map(
|
||||
file => ({
|
||||
...file,
|
||||
|
||||
Reference in New Issue
Block a user