Created
February 20, 2012 21:57
-
-
Save beatgammit/1871760 to your computer and use it in GitHub Desktop.
Vows breaks on nested topics
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function () { | |
'use strict'; | |
var vows = require('vows'), | |
assert = require('assert'); | |
vows.describe('some test').addBatch({ | |
'test level 1': { | |
topic: function () { | |
this.callback(null, 1); | |
}, | |
'is it 1?': function (one) { | |
assert.equal(one, 1); | |
}, | |
'test level 2': { | |
topic: function (one) { | |
this.callback(2, one); | |
}, | |
'is it 2?': function (two, one) { | |
assert.equal(two, 2); | |
assert.equal(one, 1); | |
}, | |
'test level 3': { | |
topic: function (two, one) { | |
this.callback(3, two, one); | |
}, | |
'is it 3?': function (three, two, one) { | |
assert.equal(three, 3); | |
assert.equal(two, 2); | |
assert.equal(one, 1); | |
}, | |
'test level 4': { | |
topic: function (three, two, one) { | |
this.callback(5, three, two, one); | |
}, | |
'is it 5?': function (five, three, two, one) { | |
assert.equal(five, 5); | |
assert.equal(three, 3); | |
assert.equal(two, 2); | |
assert.equal(one, 1); | |
} | |
} | |
} | |
} | |
} | |
}).run(); | |
}()); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment