Skip to content

Commit b14f762

Browse files
committed
[test] Add failing tests for #287.
1 parent 775db8f commit b14f762

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

test/reporters/reporters-test.js

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
var fs = require('fs');
2+
var path = require('path');
3+
var vows = require('../../lib/vows');
4+
var assert = require('assert');
5+
6+
var reporterPath = path.join(__dirname, '..', '..', 'lib', 'vows', 'reporters')
7+
var reporters = fs.readdirSync(reporterPath).reduce(function (acc, name) {
8+
acc[name] = require(path.join(reporterPath, name));
9+
return acc;
10+
}, {})
11+
12+
vows.describe('vows/reporters').addBatch(
13+
Object.keys(reporters).reduce(function (acc, name) {
14+
acc[name] = {
15+
topic: reporters[name],
16+
'should have the setStream() method': function (reporter) {
17+
assert.isFunction(reporter.setStream);
18+
}
19+
};
20+
21+
return acc;
22+
}, {})
23+
).export(module);

0 commit comments

Comments
 (0)