@@ -21,8 +21,11 @@ import {
2121describe ( 'connection-tls' , ( ) => {
2222 let chinook : SQLiteCloudConnection
2323
24- beforeEach ( ( ) => {
25- chinook = getChinookTlsConnection ( )
24+ beforeEach ( done => {
25+ chinook = getChinookTlsConnection ( error => {
26+ expect ( error ) . toBeNull ( )
27+ done ( error )
28+ } )
2629 } )
2730
2831 afterEach ( ( ) => {
@@ -54,20 +57,24 @@ describe('connection-tls', () => {
5457 expect ( remoteConfig . tlsOptions ) . toBeFalsy ( )
5558 } )
5659
57- it ( 'should connect with config object string' , done => {
58- const configObj = getChinookConfig ( )
59- const conn = new SQLiteCloudTlsConnection ( configObj , error => {
60- expect ( error ) . toBeNull ( )
61- expect ( conn . connected ) . toBe ( true )
60+ it (
61+ 'should connect with config object string' ,
62+ done => {
63+ const configObj = getChinookConfig ( )
64+ const conn = new SQLiteCloudTlsConnection ( configObj , error => {
65+ expect ( error ) . toBeNull ( )
66+ expect ( conn . connected ) . toBe ( true )
6267
63- chinook . sendCommands ( 'TEST STRING' , ( error , results ) => {
64- conn . close ( )
65- expect ( conn . connected ) . toBe ( false )
66- done ( )
68+ chinook . sendCommands ( 'TEST STRING' , ( error , results ) => {
69+ conn . close ( )
70+ expect ( conn . connected ) . toBe ( false )
71+ done ( )
72+ } )
6773 } )
68- } )
69- expect ( conn ) . toBeDefined ( )
70- } )
74+ expect ( conn ) . toBeDefined ( )
75+ } ,
76+ LONG_TIMEOUT
77+ )
7178
7279 it ( 'should connect with connection string' , done => {
7380 if ( CHINOOK_DATABASE_URL . indexOf ( 'localhost' ) > 0 ) {
0 commit comments