Description
I mean, we already have few issues because the way the whole code is written - I'm talking for the GENTLY
thing at first line of each file ( #337 ). Tests are very confusing and not so easy to maintain. Switching to something more meaningful for whole community would be great - both for us, newcomers and new contributors.
And I'm not talking to switch to something fancy and shitty like AVA or whatever. But the whole testing organization should be changed and rewritten:
mocha
- nah.. too big code, shit and in bonus: globals; no thanks (self pref. i stopped using it, used it for about few months when i enter in nodejs - I don't see fit using it soon after that. It is not just a selfpref. it is too big with no reason)ava
- mega big, mega shit, too fancy. selfpref: just seeing a very little bit sense some to use it only if project is huge/enterprise- testit - small, compact, using promises and support nested groups and tests (needless); selfpref: used it through my thin wrapper
assertit
for 1 year - seems good in most cases, but has bad debugging experience - mukla - absolutely thin with support for streams, callbacks, promises, child processes, async/await and sync tests (ran in parallel), no support for nested groups and tests (enforce atomic tests, if test suite is huge separate it to files), meaningful testing
mocha/tape/testit
-style using it from 3 years. It is absolutely stable and debugging is cool (has some edge cases that sucks, but it is because the architecture) - at least has clean stacktraces - 1-2 meaningful lines max. But i'm releasing v1 soon (even it is written i'm just blocked because other packages and switching workflow tools). Compared to the other similar testing libs is very good and almost 1:1 (porting from mocha-style + assert to mukla is for ~1min) without the cost for huge install times and huge deps.
I have pretty good experience about testing and building core blocks of such tools. I have written a few testing libs few times. And I always try to stay to standards and conventions, so to not have learning curve. In the case with mukla
it is just enough to switch it
with test
or just make var it = require('mukla')
. I just have few ideas for different API approaches and this can be seen in the v1 issue.
mocha
var assert = require('assert')
it('foo bar', function (done) {
assert.strictEqual(1, 2)
done()
})
mukla
var test = require('mukla')
var it = test // main export is function
var assert = test // mukla exposes all `assert` methods
it('foo bar', function (done) {
assert.strictEqual(1, 2)
done()
})
With easy migration path mukla v1
(mocha-style) -> gruu v1
(compat layer/mix of tape-style and mukla/mocha-style) -> asia v1
(ava/tape-like).
But anyway. I may gone too offtopic, but hope it make sense.
So in short, if you want forget all I said previously, but we need to change two things - 1) rewrite tests, using some meaningful lib and something like superagent
; 2) fix the GENTLY thing
/cc @badeball @pornel (sorry for the typos if any, kinda dyslexia ;d)