getify / monio

The most powerful IO monad implementation in JS, possibly in any language!
http://monio.run
MIT License
1.06k stars 58 forks source link

testing tools/frameworks #1

Closed mishelashala closed 4 years ago

mishelashala commented 4 years ago

do you have any plan to add unit/integration tests? If so, do you have any approach (bdd/tdd) or tool/framework (jest, mocha) on mind?

getify commented 4 years ago

Absolutely we need full unit tests. Definitely hoping to have some help with it! I always insist on my libraries having 100% test coverage for a 1.0 release. :)

I have always preferred qunit for simple unit testing, and istanbul (now called NYC) for code coverage. Here's an example of how I do it in another of my projects (CAF):

Ideally what I'd like is to get a small handful of tests put together and work out which lib and setup can be agreed on to work best, before go off and do the work to write a whole test suite for it.


ALSO, note... the current Monio code in index.js is going to be relocated into a subdirectory (likely src) and it's also going to be re-organized (either as a single UMD file, or a series of ESM modules, or something like that). So it's better if the test suite stays small (for now) so those kinds of changes can be incorporated more easily.

getify commented 4 years ago

FYI... the reorg has landed, so it should be a lot easier to start writing tests.

mishelashala commented 4 years ago

Thanks for the info, I'll take a look