/
describe_test.js
56 lines (45 loc) · 1.37 KB
/
describe_test.js
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
'use strict';
var command = require('../lib/commands').describe;
var Test = require('./_common');
describe('describe', function () {
it('describe tag', function (done) {
var options = {
tags: true
};
new Test(command, options)
.expect(['describe', '--tags', '--abbrev=7', '--candidates=10', 'HEAD'])
.run(done);
});
it('describe all', function (done) {
var options = {
all: true
};
new Test(command, options)
.expect(['describe', '--all', '--abbrev=7', '--candidates=10', 'HEAD'])
.run(done);
});
it('describe abbrev', function (done) {
var options = {
abbrev: 0
};
new Test(command, options)
.expect(['describe', '--abbrev=0', '--candidates=10', 'HEAD'])
.run(done);
});
it('describe candidates', function (done) {
var options = {
candidates: 5
};
new Test(command, options)
.expect(['describe', '--abbrev=7', '--candidates=5', 'HEAD'])
.run(done);
});
it('describe contains', function (done) {
var options = {
contains: 5
};
new Test(command, options)
.expect(['describe', '--contains', '--abbrev=7', '--candidates=10', 'HEAD'])
.run(done);
});
});