Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Move away from topic chain and onto callback as parameter #10

twolfson opened this Issue Mar 23, 2013 · 2 comments


None yet
1 participant

twolfson commented Mar 23, 2013

While vows got the layout dead-on, the topic chain is clunky and this fares much better in battle.

Try out using the first parameter as a callback and indicator that a function is asynchronous (as done in mocha).

I am not sure how this will tie into TDD frameworks (e.g. qunit) which wrap require test.start and test.stop for async functionality. However, in that same bucket, some require test.expect which opens another can of worms.


twolfson commented Mar 23, 2013

5 minute thought. This is not necessarily the conclusion.

By moving the the function (done) { paradigm, we are establishing the first parameter is the frameworks way to interact with the user. Similarly, this is becoming our contextual data store.

Since we are in JS, we can adapt the done parameter based on the engine. For instance, if the user wants to start using a TDD engine, we can write properties to done. However, for semantics sake, now we rename it test.

test still functions as an asynchronous callback, however in this TDD style, they are opting not to use it as that.

Instead, they can still use their utilities (e.g. test.done, test.expect, test.stop). This leads us into assuming that every test is asynchronous, however in these scenarios, we will require test.done or done itself to be invoked.


twolfson commented Mar 23, 2013

Ugh, I think these thoughts belong with [Ensighten/crossbones][crossbones].


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment