Skip to content


Subversion checkout URL

You can clone with
Download ZIP


Clarify "thenable" #330

cowwoc opened this Issue · 6 comments

3 participants


The documentation says that asynchronous tests can return a "thenable" but does not provide a code sample. It's not clear how this would work. Please provide some sample code as part of the documentation.


@cjohansen can correct me if I'm wrong, but in this case, a "thenable" means any Promises/A+ compliant promise, such as those of when.js, Q, etc., or a "promise-like" object with a then method that is close enough in behavior to Promises/A+, such as jQuery Deferred.

Buster will detect that a test has returned a promise, and will only consider the test to be done when the promise fulfills or rejects, which (I think) will signify the outcome of the test (pass/fail).

Buster uses when.js internally, so it can handle most anything that resembles a thenable promise. As shown here, you can roll your own simple "promise-like" object for very simple cases. Or you can use a full promise implementation to create a promise and return it.

Hope that helps!


I would recommend linking the word "thenable" to the last link you included.


@cowwoc Good call


Sounds good. @cowwoc where did you find the unlinked "thenable" reference?


Go to and search for "thenable".



@cjohansen cjohansen closed this
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.