@@ -71,6 +71,11 @@ describe('git-repo-info', function() {
71
71
sha : '5359aabd3872d9ffd160712e9615c5592dfe6745' ,
72
72
abbreviatedSha : '5359aabd38' ,
73
73
tag : null ,
74
+ committer : null ,
75
+ committerDate : null ,
76
+ author : null ,
77
+ authorDate : null ,
78
+ commitMessage : null ,
74
79
root : repoRoot
75
80
} ;
76
81
@@ -86,6 +91,11 @@ describe('git-repo-info', function() {
86
91
sha : '9dac893d5a83c02344d91e79dad8904889aeacb1' ,
87
92
abbreviatedSha : '9dac893d5a' ,
88
93
tag : null ,
94
+ committer : null ,
95
+ committerDate : null ,
96
+ author : null ,
97
+ authorDate : null ,
98
+ commitMessage : null ,
89
99
root : repoRoot
90
100
} ;
91
101
@@ -101,6 +111,11 @@ describe('git-repo-info', function() {
101
111
sha : 'd670460b4b4aece5915caf5c68d12f560a9fe3e4' ,
102
112
abbreviatedSha : 'd670460b4b' ,
103
113
tag : null ,
114
+ committer : null ,
115
+ committerDate : null ,
116
+ author : null ,
117
+ authorDate : null ,
118
+ commitMessage : null ,
104
119
root : repoRoot
105
120
} ;
106
121
@@ -116,26 +131,58 @@ describe('git-repo-info', function() {
116
131
sha : '5359aabd3872d9ffd160712e9615c5592dfe6745' ,
117
132
abbreviatedSha : '5359aabd38' ,
118
133
tag : 'my-tag' ,
134
+ committer : null ,
135
+ committerDate : null ,
136
+ author : null ,
137
+ authorDate : null ,
138
+ commitMessage : null ,
119
139
root : repoRoot
120
140
} ;
121
141
122
142
assert . deepEqual ( result , expected ) ;
123
143
} ) ;
124
144
125
- it ( 'returns an object with repo info, including the tag (unpacked tags)' , function ( ) {
126
- var repoRoot = path . join ( testFixturesPath , 'tagged-commit-unpacked' ) ;
127
- var result = repoInfo ( path . join ( repoRoot , gitDir ) ) ;
145
+ if ( zlib . inflateSync ) {
146
+ it ( 'returns an object with repo info, including the tag (unpacked tags)' , function ( ) {
147
+ var repoRoot = path . join ( testFixturesPath , 'tagged-commit-unpacked' ) ;
148
+ var result = repoInfo ( path . join ( repoRoot , gitDir ) ) ;
128
149
129
- var expected = {
130
- branch : 'master' ,
131
- sha : 'c1ee41c325d54f410b133e0018c7a6b1316f6cda' ,
132
- abbreviatedSha : 'c1ee41c325' ,
133
- tag : 'awesome-tag' ,
134
- root : repoRoot
135
- } ;
150
+ var expected = {
151
+ branch : 'master' ,
152
+ sha : 'c1ee41c325d54f410b133e0018c7a6b1316f6cda' ,
153
+ abbreviatedSha : 'c1ee41c325' ,
154
+ tag : 'awesome-tag' ,
155
+ committer :
'Robert Jackson <[email protected] >' ,
156
+ committerDate : '2015-04-15T12:10:06.000Z' ,
157
+ author :
'Robert Jackson <[email protected] >' ,
158
+ authorDate : '2015-04-15T12:10:06.000Z' ,
159
+ commitMessage : 'Initial commit.' ,
160
+ root : repoRoot
161
+ } ;
136
162
137
- assert . deepEqual ( result , expected ) ;
138
- } ) ;
163
+ assert . deepEqual ( result , expected ) ;
164
+ } ) ;
165
+ } else {
166
+ it ( 'returns an object with repo info, including the tag (unpacked tags)' , function ( ) {
167
+ var repoRoot = path . join ( testFixturesPath , 'tagged-commit-unpacked' ) ;
168
+ var result = repoInfo ( path . join ( repoRoot , gitDir ) ) ;
169
+
170
+ var expected = {
171
+ branch : 'master' ,
172
+ sha : 'c1ee41c325d54f410b133e0018c7a6b1316f6cda' ,
173
+ abbreviatedSha : 'c1ee41c325' ,
174
+ tag : 'awesome-tag' ,
175
+ committer : null ,
176
+ committerDate : null ,
177
+ author : null ,
178
+ authorDate : null ,
179
+ commitMessage : null ,
180
+ root : repoRoot
181
+ } ;
182
+
183
+ assert . deepEqual ( result , expected ) ;
184
+ } ) ;
185
+ }
139
186
140
187
it ( 'returns an object with repo info, including the tag (unpacked tags) when a tag object does not exist' , function ( ) {
141
188
var repoRoot = path . join ( testFixturesPath , 'tagged-commit-unpacked-no-object' ) ;
@@ -146,6 +193,11 @@ describe('git-repo-info', function() {
146
193
sha : 'c1ee41c325d54f410b133e0018c7a6b1316f6cda' ,
147
194
abbreviatedSha : 'c1ee41c325' ,
148
195
tag : 'awesome-tag' ,
196
+ committer : null ,
197
+ committerDate : null ,
198
+ author : null ,
199
+ authorDate : null ,
200
+ commitMessage : null ,
149
201
root : repoRoot
150
202
} ;
151
203
@@ -162,6 +214,11 @@ describe('git-repo-info', function() {
162
214
sha : 'c1ee41c325d54f410b133e0018c7a6b1316f6cda' ,
163
215
abbreviatedSha : 'c1ee41c325' ,
164
216
tag : 'awesome-tag' ,
217
+ committer :
'Robert Jackson <[email protected] >' ,
218
+ committerDate : '2015-04-15T12:10:06.000Z' ,
219
+ author :
'Robert Jackson <[email protected] >' ,
220
+ authorDate : '2015-04-15T12:10:06.000Z' ,
221
+ commitMessage : 'Initial commit.' ,
165
222
root : repoRoot
166
223
} ;
167
224
@@ -178,6 +235,11 @@ describe('git-repo-info', function() {
178
235
sha : '5359aabd3872d9ffd160712e9615c5592dfe6745' ,
179
236
abbreviatedSha : '5359aabd38' ,
180
237
tag : null ,
238
+ committer : null ,
239
+ committerDate : null ,
240
+ author : null ,
241
+ authorDate : null ,
242
+ commitMessage : null ,
181
243
root : repoRoot
182
244
} ;
183
245
0 commit comments