Skip to content

Commit f50247c

Browse files
committed
Unit tests for thr CLI
1 parent 8ccd315 commit f50247c

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed

test/cli.js

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
/*jslint node:true, es5:true, unparam:true, nomen: true*/
2+
3+
'use strict';
4+
5+
var vows = require('vows');
6+
7+
var assert = require('assert');
8+
9+
var path = require('path');
10+
11+
var execFile = require('child_process').execFile;
12+
13+
var suite = vows.describe('cli');
14+
15+
suite.addBatch({
16+
'sanity': {
17+
topic: function () {
18+
execFile(path.join(__dirname, '..', 'bin', 'cpplint'), [
19+
path.join(__dirname, 'fixtures', 'node-cpp-hello.cpp')
20+
], null, this.callback);
21+
},
22+
23+
'should run successfully': function (error, stdout, stderr) {
24+
assert.isNull(error);
25+
assert.isString(stdout);
26+
assert.isEmpty(stderr);
27+
}
28+
}
29+
});
30+
31+
suite.export(module);

0 commit comments

Comments
 (0)