fix: simplify language specific testing

Prevents multiple languages' challenges from being tested at once.
This commit is contained in:
Oliver Eyton-Williams
2020-08-13 17:05:52 +02:00
committed by Mrugesh Mohapatra
parent 45e4a770a2
commit 7055211959
6 changed files with 41 additions and 60 deletions

View File

@ -4,7 +4,7 @@ const through2 = require('through2');
const { locale } = require('../config/env.json');
const { getChallengesForLang } = require('./getChallenges');
const { testedLangs } = require('./utils');
const { testedLang } = require('./utils');
const lintMarkdown = require('../tools/scripts/lint');
/**
@ -28,7 +28,7 @@ function watchFiles() {
}
function lint() {
return gulp.src(globLangs(testedLangs()), { read: false }).pipe(
return gulp.src(globLang(testedLang()), { read: false }).pipe(
through2.obj(function obj(file, enc, next) {
lintMarkdown(file, next);
})
@ -41,8 +41,8 @@ const defaultTask = gulp.series(generateCurriculum, watchFiles);
* Helper functions
**/
function globLangs(langs) {
return langs.map(lang => `./challenges/${lang}/**/*.md`);
function globLang(lang) {
return `./challenges/${lang}/**/*.md`;
}
gulp.task('default', defaultTask);