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 {
160160 this . _hasFailed = true ;
161161 }
162162 }
163+ onCompleted ( message ) {
164+ if ( this . _driver . onCompleted ) {
165+ this . _driver . onCompleted ( message ) ;
166+ }
167+ }
163168}
164169
165170let USER_AGENT = "neo4j-javascript/" + VERSION ;
Original file line number Diff line number Diff line change @@ -62,4 +62,17 @@ describe('driver', function() {
6262 // When
6363 driver . session ( ) ;
6464 } ) ;
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+ } ) ;
6578} ) ;
You can’t perform that action at this time.
0 commit comments