-
Notifications
You must be signed in to change notification settings - Fork 5
Open
Description
This library needs some form of unit testing. There are over 150 individual functions that make up evalmd, a lot of logging and writing to stdout & stderr, flags, exit codes, relying on package.json, deps that need to be installed. There are two ways of testing evalmd.
- I can collect full module / repos. Assert an exit code and evaluate the markdown. Something like
testSuccess('https://github.com/ljharb/object.assign', 'README.md')(probably wise to specify commit hash) where this wouldgit clonethe repo and runnpm installthen evaluate the markdown. Ideally I can supply optional flags as well. This method can usenixtto ensure the bin itself works as expected, and the exit code is correct. - I can test each and every function individually which would be great because them I can ensure code coverage. Or because
eval-markdown.jsreturns one function that utilizes every other function I can just test it, however I still run into an issue where I need — not only a single markdown file to test, but a whole environment withpackage.jsonandnode_modules. - A combination of both methods. (probably wise, however a ton of work)
Thoughts?
Metadata
Metadata
Assignees
Labels
No labels