Sub tests of errors #231

Closed
niknah opened this Issue Sep 26, 2012 · 0 comments

Comments

Projects
None yet
1 participant

niknah commented Sep 26, 2012

How do I go about making sub tests of error tests?

The below doesn't do the 2nd test.

And it also doesn't print out which test had the error. When I first noticed this in a bigger group of tests, it took me a while to figure out which test actually had the error cause all the tests are running async.

var vows=require('vows'),
        fs=require('fs');
        assert=require('assert');

vows.describe('xxx').addBatch({
'abc':{
        topic:function() {
                fs.mkdir('/fail',0775,this.callback);
        },
        err:function(err,func) {
                assert.isNotNull(err);
        },
        'This must fail too':{
                topic:function() {
                        fs.mkdir('/fail/fail',0775,this.callback);
                },
                'Expect Failure':function(err) {
                        assert.isNotNull(err);
                }
        }
}
}).export(module);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment