@@ -5,10 +5,10 @@ var promisify = require("promisify-node");
55var fse = promisify ( require ( "fs-extra" ) ) ;
66var local = path . join . bind ( path , __dirname ) ;
77
8- var NodeGit = require ( local ( "../../" ) ) ;
9- var Repository = NodeGit . Repository ;
10-
118describe ( "Commit" , function ( ) {
9+ var NodeGit = require ( local ( "../../" ) ) ;
10+ var Repository = NodeGit . Repository ;
11+
1212 var reposPath = local ( "../repos/workdir/.git" ) ;
1313 var oid = "fce88902e66c72b5b93e75bdb5ae717038b221f6" ;
1414
@@ -137,41 +137,7 @@ describe("Commit", function() {
137137 } ) ;
138138 } ) ;
139139
140- describe ( "author" , function ( ) {
141- before ( function ( ) {
142- this . author = this . commit . author ( ) ;
143- } ) ;
144-
145- it ( "is available" , function ( ) {
146- assert . ok ( this . author instanceof NodeGit . Signature ) ;
147- } ) ;
148-
149- it ( "has a name" , function ( ) {
150- assert . equal ( this . author . name ( ) , "Michael Robinson" ) ;
151- } ) ;
152-
153- it ( "has an email" , function ( ) {
154- assert . equal ( this . author . email ( ) , "mike@panmedia.co.nz" ) ;
155- } ) ;
156- } ) ;
157-
158- describe ( "committer" , function ( ) {
159- before ( function ( ) {
160- this . committer = this . commit . committer ( ) ;
161- } ) ;
162-
163- it ( "is available" , function ( ) {
164- assert . ok ( this . committer instanceof NodeGit . Signature ) ;
165- } ) ;
166140
167- it ( "has a name" , function ( ) {
168- assert . equal ( this . committer . name ( ) , "Michael Robinson" ) ;
169- } ) ;
170-
171- it ( "has an email" , function ( ) {
172- assert . equal ( this . committer . email ( ) , "mike@panmedia.co.nz" ) ;
173- } ) ;
174- } ) ;
175141
176142 it ( "has an owner" , function ( ) {
177143 var owner = this . commit . owner ( ) ;
@@ -210,7 +176,7 @@ describe("Commit", function() {
210176 } ) ;
211177 } ) ;
212178
213- it ( "can fetch all its parents" , function ( ) {
179+ it ( "can fetch all of its parents" , function ( ) {
214180 return this . commit . getParents ( ) . then ( function ( parents ) {
215181 assert . equal ( parents . length , 1 ) ;
216182
@@ -285,4 +251,40 @@ describe("Commit", function() {
285251 assert . equal ( diff . length , 1 ) ;
286252 } ) ;
287253 } ) ;
254+
255+ describe ( "Commit's Author" , function ( ) {
256+ before ( function ( ) {
257+ this . author = this . commit . author ( ) ;
258+ } ) ;
259+
260+ it ( "is available" , function ( ) {
261+ assert . ok ( this . author instanceof NodeGit . Signature ) ;
262+ } ) ;
263+
264+ it ( "has a name" , function ( ) {
265+ assert . equal ( this . author . name ( ) , "Michael Robinson" ) ;
266+ } ) ;
267+
268+ it ( "has an email" , function ( ) {
269+ assert . equal ( this . author . email ( ) , "mike@panmedia.co.nz" ) ;
270+ } ) ;
271+ } ) ;
272+
273+ describe ( "Commit's Committer" , function ( ) {
274+ before ( function ( ) {
275+ this . committer = this . commit . committer ( ) ;
276+ } ) ;
277+
278+ it ( "is available" , function ( ) {
279+ assert . ok ( this . committer instanceof NodeGit . Signature ) ;
280+ } ) ;
281+
282+ it ( "has a name" , function ( ) {
283+ assert . equal ( this . committer . name ( ) , "Michael Robinson" ) ;
284+ } ) ;
285+
286+ it ( "has an email" , function ( ) {
287+ assert . equal ( this . committer . email ( ) , "mike@panmedia.co.nz" ) ;
288+ } ) ;
289+ } ) ;
288290} ) ;
0 commit comments