forked from austintgriffith/speedrun-grader
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Better feedback on the JSON response
- Loading branch information
Showing
4 changed files
with
109 additions
and
86 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
const MESSAGES = { | ||
telegramHelp: (challenge) => { | ||
return ( | ||
`<p>After fixing the issues please resubmit the challenge. ` + | ||
`If you are still having issues, join the challenge <a href="${challenge.telegram}" target="_blank">Telegram channel</a>.</p>` | ||
); | ||
}, | ||
failedTest: (challenge) => { | ||
return ( | ||
`<p>This submission did not pass all tests. Review the output below to see which tests failed and why. ` + | ||
`Viewing the file that is used for testing (packages/hardhat/test/challenge_${challenge.id}.js) ` + | ||
`may help you find the exact section in which the tests failed.</p>` + | ||
`${MESSAGES.telegramHelp(challenge)}<p>--</p>` | ||
); | ||
}, | ||
successTest: (challenge) => { | ||
return ( | ||
challenge.successMessage ?? | ||
`<p>You passed all tests on Challenge ${challenge.id}, keep it up!</p><p>--</p>` | ||
); | ||
}, | ||
}; | ||
|
||
module.exports = { MESSAGES }; |