test: enable tests for steps (#44550)
* fix: handle missing solutions correctly Rather than creating an [[]] the parser now creates [] which isEmpty(). This makes the test suite check the next challenge for a solution. In addition, the logic for testing solutions was fixed. * chore: update snapshots * test: build new superblock in node.js-tests CI * test: allow forward slash in superblock slug * fix: borked tests oops * test: ignore duplicated projects * fix: i did not break these shaun did :) * fix: idIndex is index of id not id Co-authored-by: Nicholas Carrigan <nhcarrigan@gmail.com>
This commit is contained in:
committed by
GitHub
parent
4be4bf3624
commit
36363f277d
@ -4,6 +4,7 @@ Joi.objectId = require('joi-objectid')(Joi);
|
||||
const { challengeTypes } = require('../../client/utils/challenge-types');
|
||||
|
||||
const slugRE = new RegExp('^[a-z0-9-]+$');
|
||||
const slugWithSlashRE = new RegExp('^[a-z0-9-/]+$');
|
||||
|
||||
const fileJoi = Joi.object().keys({
|
||||
fileKey: Joi.string(),
|
||||
@ -90,8 +91,8 @@ const schema = Joi.object()
|
||||
crossDomain: Joi.bool()
|
||||
})
|
||||
),
|
||||
solutions: Joi.array().items(Joi.array().items(fileJoi)),
|
||||
superBlock: Joi.string().regex(slugRE),
|
||||
solutions: Joi.array().items(Joi.array().items(fileJoi).min(1)),
|
||||
superBlock: Joi.string().regex(slugWithSlashRE),
|
||||
superOrder: Joi.number(),
|
||||
suborder: Joi.number(),
|
||||
tests: Joi.array().items(
|
||||
|
Reference in New Issue
Block a user