Skip to content

Commit 05333a8

Browse files
committed
test: don't test if no markdown or ast
1 parent f2650d2 commit 05333a8

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

index.ts

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -359,12 +359,14 @@ files.forEach((file) => {
359359
if (html && !html.endsWith('\n')) {
360360
html = html.concat('\n');
361361
}
362-
jsonTestCases = jsonTestCases.concat({
363-
title: `${file.replace('.yml', '')}: ${testCase.title}`,
364-
mdast: testCase.mdast,
365-
myst: testCase.myst,
366-
html,
367-
});
362+
if (testCase.myst !== undefined && testCase.mdast !== undefined) {
363+
jsonTestCases.push({
364+
title: `${file.replace('.yml', '')}: ${testCase.title}`,
365+
mdast: testCase.mdast,
366+
myst: testCase.myst,
367+
html,
368+
});
369+
}
368370
}
369371
if (testCase.id) {
370372
const outFile = join(directory, `${testCase.id}.md`);

0 commit comments

Comments
 (0)