/
commit-info-spec.js
50 lines (46 loc) · 1.12 KB
/
commit-info-spec.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
exports['commit-info combination with environment variables has certain api 1'] = [
"commitInfo",
"getBranch",
"getMessage",
"getEmail",
"getAuthor",
"getSha",
"getRemoteOrigin",
"getSubject",
"getBody"
]
exports['commit-info combination with environment variables returns information 1'] = {
"branch": "test-branch",
"message": "some git message",
"email": "user@company.com",
"author": "John Doe",
"sha": "abc123",
"remote": "git@github.com/repo"
}
exports['commit-info no environment variables has certain api 1'] = [
"commitInfo",
"getBranch",
"getMessage",
"getEmail",
"getAuthor",
"getSha",
"getRemoteOrigin",
"getSubject",
"getBody"
]
exports['commit-info no environment variables returns information 1'] = {
"branch": "test-branch",
"message": "important commit",
"email": "me@foo.com",
"author": "John Doe",
"sha": "abc123",
"remote": "git@github.com/repo"
}
exports['commit-info no environment variables returns nulls for missing fields 1'] = {
"branch": "test-branch",
"message": null,
"email": "me@foo.com",
"author": null,
"sha": "abc123",
"remote": null
}