mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-05-05 00:00:18 -04:00
chore(tools): test for instructions in schema (#60323)
Co-authored-by: Huyen Nguyen <25715018+huyenltnguyen@users.noreply.github.com>
This commit is contained in:
@@ -209,7 +209,11 @@ const schema = Joi.object()
|
||||
}),
|
||||
forumTopicId: Joi.number(),
|
||||
id: Joi.objectId().required(),
|
||||
instructions: Joi.string().allow(''),
|
||||
instructions: Joi.string().when('challengeType', {
|
||||
is: [challengeTypes.pythonProject, challengeTypes.codeAllyCert],
|
||||
then: Joi.string().min(1).required(),
|
||||
otherwise: Joi.string().allow('')
|
||||
}),
|
||||
isComingSoon: Joi.bool(),
|
||||
isLocked: Joi.bool(),
|
||||
isPrivate: Joi.bool(),
|
||||
|
||||
Reference in New Issue
Block a user