runnableExamples is intended for documenting code, not exhaustively unit-testing it, so just a few doAssert per runnableExamples is standard (depending on function complexity).
I intend to clarify this in [https://github.com/nim-lang/Nim/blob/devel/doc/contributing.rst](https://github.com/nim-lang/Nim/blob/devel/doc/contributing.rst) > I thought runnableExamples are example codes that help people learning how > the proc works indeed > These code are tested so that you don't write a example code that fail to > compile or cause assert error. in practice, even if the code is separately being tested in a separate test file, a code snippet that's not run by compiler will often end up containing bugs or bitrot later on. And oftentimes there's not even such separate test file (or isMainModule block) to being with, so in this case runnableExamples is better than nothing. As said earlier, Nim has poor test coverage, and this lowers barrier of entry to increase it.