@@ -99,10 +99,10 @@ describe('examples', () => {
9999 const driver = neo4j . driver ( uri , neo4j . auth . basic ( user , password ) ) ;
100100 // end::basic-auth[]
101101
102- driver . onCompleted = ( ) => {
102+ driver . verifyConnectivity ( ) . then ( ( ) => {
103103 driver . close ( ) ;
104104 done ( ) ;
105- } ;
105+ } ) ;
106106 } ) ;
107107
108108 it ( 'config connection pool example' , done => {
@@ -116,10 +116,10 @@ describe('examples', () => {
116116 ) ;
117117 // end::config-connection-pool[]
118118
119- driver . onCompleted = ( ) => {
119+ driver . verifyConnectivity ( ) . then ( ( ) => {
120120 driver . close ( ) ;
121121 done ( ) ;
122- } ;
122+ } ) ;
123123 } ) ;
124124
125125 it ( 'config connection timeout example' , done => {
@@ -131,10 +131,10 @@ describe('examples', () => {
131131 ) ;
132132 // end::config-connection-timeout[]
133133
134- driver . onCompleted = ( ) => {
134+ driver . verifyConnectivity ( ) . then ( ( ) => {
135135 driver . close ( ) ;
136136 done ( ) ;
137- } ;
137+ } ) ;
138138 } ) ;
139139
140140 it ( 'config max retry time example' , done => {
@@ -147,10 +147,10 @@ describe('examples', () => {
147147 ) ;
148148 // end::config-max-retry-time[]
149149
150- driver . onCompleted = ( ) => {
150+ driver . verifyConnectivity ( ) . then ( ( ) => {
151151 driver . close ( ) ;
152152 done ( ) ;
153- } ;
153+ } ) ;
154154 } ) ;
155155
156156 it ( 'config trust example' , done => {
@@ -163,10 +163,10 @@ describe('examples', () => {
163163 ) ;
164164 // end::config-trust[]
165165
166- driver . onCompleted = ( ) => {
166+ driver . verifyConnectivity ( ) . then ( ( ) => {
167167 driver . close ( ) ;
168168 done ( ) ;
169- } ;
169+ } ) ;
170170 } ) ;
171171
172172 it ( 'config unencrypted example' , done => {
@@ -178,10 +178,10 @@ describe('examples', () => {
178178 ) ;
179179 // end::config-unencrypted[]
180180
181- driver . onCompleted = ( ) => {
181+ driver . verifyConnectivity ( ) . then ( ( ) => {
182182 driver . close ( ) ;
183183 done ( ) ;
184- } ;
184+ } ) ;
185185 } ) ;
186186
187187 it ( 'config custom resolver example' , done => {
@@ -217,10 +217,10 @@ describe('examples', () => {
217217 const driver = neo4j . driver ( uri , neo4j . auth . custom ( principal , credentials , realm , scheme , parameters ) ) ;
218218 // end::custom-auth[]
219219
220- driver . onCompleted = ( ) => {
220+ driver . verifyConnectivity ( ) . then ( ( ) => {
221221 driver . close ( ) ;
222222 done ( ) ;
223- } ;
223+ } ) ;
224224 } ) ;
225225
226226 it ( 'kerberos auth example' , ( ) => {
@@ -261,9 +261,9 @@ describe('examples', () => {
261261 // tag::driver-lifecycle[]
262262 const driver = neo4j . driver ( uri , neo4j . auth . basic ( user , password ) ) ;
263263
264- driver . onCompleted = ( ) => {
264+ driver . verifyConnectivity ( ) . then ( ( ) => {
265265 console . log ( 'Driver created' ) ;
266- } ;
266+ } ) ;
267267
268268 driver . onError = error => {
269269 console . log ( error ) ;
0 commit comments