Skip to content
New issue

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

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sub tests of errors #231

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

Sub tests of errors #231

niknah opened this issue Sep 26, 2012 · 0 comments

Comments

@niknah
Copy link

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
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant