Improves dealing with pending tests #165

wants to merge 7 commits into


None yet
7 participants

ixti commented Dec 11, 2011

right now you are allowed to only replace test function with string (which also makes no sense). So if you want "stub" some test without "failing" the suite you might do it as follows:

  'foo': 'bar'/* function (result) {
    assert.equal(result, 'good');

More than that test is simply marked s pending. This patch allows to have more sexy way to mark tests as pending:

specify reason of disabling test

  'foo': 'not sure about what to test yet'

throw "pending" right from the test

  'foo': function (result) {
    throw {pending: 'this feature is planned but not implemented'};
    assert.equal(result, 'good');

You can omit message, in this case it will output same as it works now. With given message, it will be appended just like for the broken test.

ixti commented Feb 10, 2012

Can somebody clarify is core team interested in this feature or not at all?
It's 2 month old now. And as I need it for myself I would like to know
opinion of core team to reflect my own infrastructure.

PS If this is interesting. I think that would be great to add ability to
skip test and mark them as skipped by throwing {skip: "message"}.

puzrin commented Mar 5, 2012

Any news on accepting/rejecting this pull request?

osher commented Aug 9, 2012



JerrySievert commented Aug 10, 2012

@ixti can you provide an example of output with this change?


ixti commented Aug 14, 2012

Hmm I don't remember exactly but it was similar to existing "pending" tests but with allowing to show "message" why is it was marked as pending.

In fact we're not interested in this feature anymore.
Thanks for you notice anyway.

@ixti ixti closed this Aug 14, 2012

ixti commented Aug 14, 2012

I must clarify my last statement.

I needed this feature to be able to skip "time-expansive" tests on CI environment for example, but it can be achieved in something like this:

if (/* my condition here */) {
  vows.describe('time-expansive test').addBatch({
    // ...

Pity, seems like a very useful feature and far better than the current comment out approach.

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