Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

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

Open
twolfson opened this Issue · 2 comments

1 participant

Todd Wolfson
Todd Wolfson
Owner

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.

Todd Wolfson
Owner

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.

Todd Wolfson
Owner

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

https://github.com/Ensighten/crossbones

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.