fix: test curriculum challenges (#24180)
This commit is contained in:
committed by
mrugesh mohapatra
parent
7da04a348b
commit
e099d6486d
@ -10,6 +10,7 @@ const frontmatterToData = require('./frontmatter-to-data');
|
||||
const textToData = require('./text-to-data');
|
||||
const testsToData = require('./tests-to-data');
|
||||
const challengeSeedToData = require('./challengeSeed-to-data');
|
||||
const solutionsToData = require('./solution-to-data');
|
||||
|
||||
const processor = unified()
|
||||
.use(markdown)
|
||||
@ -18,6 +19,7 @@ const processor = unified()
|
||||
.use(testsToData)
|
||||
.use(remark2rehype, { allowDangerousHTML: true })
|
||||
.use(raw)
|
||||
.use(solutionsToData)
|
||||
.use(textToData, ['description', 'instructions'])
|
||||
.use(challengeSeedToData)
|
||||
// the plugins below are just to stop the processor from throwing
|
||||
|
@ -10,7 +10,10 @@ function createPlugin() {
|
||||
const solutions = selectAll('code', node).map(
|
||||
element => element.children[0].value
|
||||
);
|
||||
file.data.solutions = solutions;
|
||||
file.data = {
|
||||
...file.data,
|
||||
solutions
|
||||
};
|
||||
}
|
||||
}
|
||||
visit(tree, 'element', visitor);
|
||||
|
Reference in New Issue
Block a user