Skip to content

Commit 889b748

Browse files
committed
[bin test] Added additional teardown test. Update bin/vows to support absolute path. #83
1 parent c8ee815 commit 889b748

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

bin/vows

+3-1
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,9 @@ if (! options.watch) {
224224
reporter.print = _reporter.print;
225225

226226
files = args.map(function (a) {
227-
return path.join(process.cwd(), a.replace(fileExt, ''));
227+
return (!a.match(/^\//))
228+
? path.join(process.cwd(), a.replace(fileExt, ''))
229+
: a.replace(fileExt, '');
228230
});
229231

230232
runSuites(importSuites(files), function (results) {

test/vows-test.js

+5
Original file line numberDiff line numberDiff line change
@@ -350,6 +350,11 @@ vows.describe("Vows with teardowns").addBatch({
350350
"And a final vow": function (topic) {
351351
assert.isTrue(topic.flag);
352352
},
353+
'subcontext': {
354+
'nested': function (_, topic) {
355+
assert.isTrue(topic.flag);
356+
}
357+
},
353358
teardown: function (topic) {
354359
topic.flag = false;
355360
},

0 commit comments

Comments
 (0)