test(curriculum): challenge schema validator for lang

This commit is contained in:
Valeriy
2018-12-05 20:09:18 +03:00
committed by Stuart Taylor
parent 4bf89a873e
commit 81f9dce834
2 changed files with 87 additions and 81 deletions

View File

@ -22,7 +22,7 @@ const { getChallengesForLang } = require('../getChallenges');
const MongoIds = require('./utils/mongoIds');
const ChallengeTitles = require('./utils/challengeTitles');
const { validateChallenge } = require('../schema/challengeSchema');
const { challengeSchemaValidator } = require('../schema/challengeSchema');
const { challengeTypes } = require('../../client/utils/challengeTypes');
const { LOCALE: lang = 'english' } = process.env;
@ -40,8 +40,9 @@ Mocha.Runner.prototype.fail = function(test, err) {
return oldRunnerFail.call(this, test, err);
};
let mongoIds = new MongoIds();
let challengeTitles = new ChallengeTitles();
const mongoIds = new MongoIds();
const challengeTitles = new ChallengeTitles();
const validateChallenge = challengeSchemaValidator(lang);
const { JSDOM } = jsdom;