File tree Expand file tree Collapse file tree 2 files changed +18
-0
lines changed Expand file tree Collapse file tree 2 files changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -160,6 +160,11 @@ class _ConnectionStreamObserver extends StreamObserver {
160
160
this . _hasFailed = true ;
161
161
}
162
162
}
163
+ onCompleted ( message ) {
164
+ if ( this . _driver . onCompleted ) {
165
+ this . _driver . onCompleted ( message ) ;
166
+ }
167
+ }
163
168
}
164
169
165
170
let USER_AGENT = "neo4j-javascript/" + VERSION ;
Original file line number Diff line number Diff line change @@ -62,4 +62,17 @@ describe('driver', function() {
62
62
// When
63
63
driver . session ( ) ;
64
64
} ) ;
65
+
66
+ it ( 'should indicate success early on correct credentials' , function ( done ) {
67
+ // Given
68
+ var driver = neo4j . driver ( "bolt://localhost" , neo4j . auth . basic ( "neo4j" , "neo4j" ) ) ;
69
+
70
+ // Expect
71
+ driver . onCompleted = function ( meta ) {
72
+ done ( ) ;
73
+ } ;
74
+
75
+ // When
76
+ driver . session ( ) ;
77
+ } ) ;
65
78
} ) ;
You can’t perform that action at this time.
0 commit comments