File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed
Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -170,3 +170,19 @@ exports.parentsDiffTrees = function(test) {
170170 } ) ;
171171 } ) ;
172172} ;
173+
174+ exports . file = function ( test ) {
175+ test . expect ( 5 ) ;
176+ git . repo ( '../.git' , function ( error , repository ) {
177+ repository . commit ( historyCountKnownSHA , function ( error , commit ) {
178+ commit . file ( 'README.md' , function ( error , file ) {
179+ test . equal ( error , null , 'Should not error' ) ;
180+ test . notEqual ( file , null , 'File should not be null' ) ;
181+ test . equal ( file . name , 'README.md' , 'File name should match expected' ) ;
182+ test . equal ( file . sha , 'b252f396b17661462372f78b7bcfc403b8731aaa' , 'SHA shoud match expected' ) ;
183+ test . equal ( file . attributes , 33188 , 'Attributes should match expected' ) ;
184+ test . done ( ) ;
185+ } ) ;
186+ } ) ;
187+ } ) ;
188+ } ;
You can’t perform that action at this time.
0 commit comments