Skip to content

Commit 2709dde

Browse files
committed
Docstring tests: stop on docstring extraction error
1 parent 8b04851 commit 2709dde

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

tests/docstring_tests/DocTest.res

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,9 @@ let extractExamples = async () => {
8989
| Ok(doc) =>
9090
// TODO: Should this be a flag in the actual command instead, to only include code blocks with tests?
9191
examples->Array.pushMany(doc->Array.filter(d => d.code->String.includes("assertEqual(")))
92-
| Error(e) => Console.error(e)
92+
| Error(e) =>
93+
Console.error(e)
94+
JsError.panic(`Error extracting code blocks for ${f}`)
9395
}
9496
})
9597

tests/docstring_tests/DocTest.res.js

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)