forked from codeceptjs/CodeceptJS
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathhelp_test.js
More file actions
37 lines (33 loc) · 1.02 KB
/
help_test.js
File metadata and controls
37 lines (33 loc) · 1.02 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
const assert = require('assert');
const path = require('path');
const exec = require('child_process').exec;
const runner = path.join(__dirname, '/../../bin/codecept.js');
describe('help option', () => {
it('should print help message with --help option', (done) => {
exec(`${runner} --help`, (err, stdout) => {
stdout.should.include('Usage:');
stdout.should.include('Options:');
stdout.should.include('Commands:');
assert(!err);
done();
});
});
it('should print help message with -h option', (done) => {
exec(`${runner} -h`, (err, stdout) => {
stdout.should.include('Usage:');
stdout.should.include('Options:');
stdout.should.include('Commands:');
assert(!err);
done();
});
});
it('should print help message with no option', (done) => {
exec(`${runner}`, (err, stdout) => {
stdout.should.include('Usage:');
stdout.should.include('Options:');
stdout.should.include('Commands:');
assert(!err);
done();
});
});
});