mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-06-19 21:09:51 +08: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:
parent
8b33e316ab
commit
babcf47597
@ -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(),
|
||||
|
||||
Loading…
Reference in New Issue
Block a user