diff --git a/tools/challenge-parser/parser/plugins/add-tests.js b/tools/challenge-parser/parser/plugins/add-tests.js index 2776e2b0189..29604909c1f 100644 --- a/tools/challenge-parser/parser/plugins/add-tests.js +++ b/tools/challenge-parser/parser/plugins/add-tests.js @@ -8,7 +8,9 @@ function plugin() { function transformer(tree, file) { const hintNodes = getSection(tree, '--hints--'); if (hintNodes.length % 2 !== 0) - throw Error('Tests must be in (text, ```testString```) order'); + throw Error( + 'Hints must be in pairs: each hint text followed by a test code block' + ); const tests = chunk(hintNodes, 2).map(getTest); file.data.tests = tests; diff --git a/tools/challenge-parser/parser/plugins/add-tests.test.js b/tools/challenge-parser/parser/plugins/add-tests.test.js index 2f7c614e3b5..e893fcc7f87 100644 --- a/tools/challenge-parser/parser/plugins/add-tests.test.js +++ b/tools/challenge-parser/parser/plugins/add-tests.test.js @@ -42,7 +42,7 @@ describe('add-tests plugin', () => { it('should throw if a test pair is out of order', () => { // TODO: update the markdown so it makes this error expect(() => plugin(brokenHintsAST, file)).toThrow( - 'Tests must be in (text, ```testString```) order' + 'Hints must be in pairs: each hint text followed by a test code block' ); });