@@ -15,7 +15,7 @@ describe("Revwalk", function() {
1515 test . repository = repository ;
1616 test . walker = repository . createRevWalk ( ) ;
1717
18- return test . repository . getBranch ( ' rev-walk' ) . then ( function ( branch ) {
18+ return test . repository . getBranch ( " rev-walk" ) . then ( function ( branch ) {
1919 test . branch = branch ;
2020 test . walker . push ( test . branch . id ( ) ) ;
2121 done ( ) ;
@@ -38,16 +38,29 @@ describe("Revwalk", function() {
3838 it ( "can hide an object" , function ( ) {
3939 var test = this ;
4040
41- //this.walker.hide(Oid.fromstr("95f695136203a372751c19b6353aeb5ae32ea40e"));
42-
4341 return test . walker . next ( ) . then ( function ( commit ) {
44- console . log ( commit . toString ( ) ) ;
4542 return test . walker . next ( ) . then ( function ( commit ) {
46- console . log ( commit . toString ( ) ) ;
4743 return test . walker . next ( ) . then ( function ( commit ) {
48- console . log ( commit . toString ( ) ) ;
49- assert . equal ( commit . toString ( ) ,
50- "b8a94aefb22d0534cc0e5acf533989c13d8725dc" ) ;
44+ return test . walker . next ( ) . then ( function ( commit ) {
45+ assert . equal ( commit . toString ( ) ,
46+ "b8a94aefb22d0534cc0e5acf533989c13d8725dc" ) ;
47+ test . walker = test . repository . createRevWalk ( ) ;
48+ test . walker . push ( test . branch . id ( ) ) ;
49+ test . walker . hide (
50+ Oid . fromstr ( "b8a94aefb22d0534cc0e5acf533989c13d8725dc" ) ) ;
51+
52+ return test . walker . next ( ) . then ( function ( commit ) {
53+ return test . walker . next ( ) . then ( function ( commit ) {
54+ return test . walker . next ( ) . then ( function ( commit ) {
55+ assert . equal ( commit . toString ( ) ,
56+ "95f695136203a372751c19b6353aeb5ae32ea40e" ) ;
57+ return test . walker . next ( ) . then ( function ( commit ) {
58+ assert . equal ( commit , undefined ) ;
59+ } ) ;
60+ } ) ;
61+ } ) ;
62+ } ) ;
63+ } ) ;
5164 } ) ;
5265 } ) ;
5366 } ) ;
0 commit comments