@@ -74,7 +74,7 @@ describe('OptsHandler class', () => {
7474 dbType : undefined ,
7575 driverFactory : undefined ,
7676 } ) ;
77-
77+
7878 expect ( core . options . dbType ) . toBeDefined ( ) ;
7979 expect ( typeof core . options . dbType ) . toEqual ( 'function' ) ;
8080 expect ( await core . options . dbType ( { } as DriverContext ) )
@@ -160,7 +160,7 @@ describe('OptsHandler class', () => {
160160 type : < DatabaseType > process . env . CUBEJS_DB_TYPE ,
161161 } ) ,
162162 } ) ;
163-
163+
164164 expect ( core . options . dbType ) . toBeDefined ( ) ;
165165 expect ( typeof core . options . dbType ) . toEqual ( 'function' ) ;
166166 expect ( await core . options . dbType ( { } as DriverContext ) )
@@ -180,7 +180,7 @@ describe('OptsHandler class', () => {
180180 type : < DatabaseType > process . env . CUBEJS_DB_TYPE ,
181181 } ) ,
182182 } ) ;
183-
183+
184184 expect ( core . options . dbType ) . toBeDefined ( ) ;
185185 expect ( typeof core . options . dbType ) . toEqual ( 'function' ) ;
186186 expect ( await core . options . dbType ( { } as DriverContext ) )
@@ -200,7 +200,7 @@ describe('OptsHandler class', () => {
200200 type : < DatabaseType > process . env . CUBEJS_DB_TYPE ,
201201 } ) ,
202202 } ) ;
203-
203+
204204 expect ( core . options . dbType ) . toBeDefined ( ) ;
205205 expect ( typeof core . options . dbType ) . toEqual ( 'function' ) ;
206206 expect ( await core . options . dbType ( { } as DriverContext ) )
@@ -220,7 +220,7 @@ describe('OptsHandler class', () => {
220220 type : < DatabaseType > process . env . CUBEJS_DB_TYPE ,
221221 } ) ,
222222 } ) ;
223-
223+
224224 expect ( core . options . dbType ) . toBeDefined ( ) ;
225225 expect ( typeof core . options . dbType ) . toEqual ( 'function' ) ;
226226 expect ( await core . options . dbType ( { } as DriverContext ) )
@@ -260,8 +260,7 @@ describe('OptsHandler class', () => {
260260 } ) ;
261261 await core . options . driverFactory ( < DriverContext > { dataSource : 'default' } ) ;
262262 } ) . rejects . toThrow (
263- 'Invalid cube-server-core options: child "driverFactory" fails because ' +
264- '["driverFactory" must be a Function]'
263+ 'Invalid cube-server-core options: "driverFactory" must be of type function'
265264 ) ;
266265
267266 // Case 3 -- need to be restored after assertion will be restored.
@@ -303,8 +302,7 @@ describe('OptsHandler class', () => {
303302 } ) ;
304303 await core . options . dbType ( < DriverContext > { dataSource : 'default' } ) ;
305304 } ) . rejects . toThrow (
306- 'Invalid cube-server-core options: child "dbType" fails because ' +
307- '["dbType" must be a string, "dbType" must be a Function]'
305+ 'Invalid cube-server-core options: "dbType" does not match any of the allowed types'
308306 ) ;
309307
310308 // Case 6
@@ -402,7 +400,7 @@ describe('OptsHandler class', () => {
402400 const opts = oapi . options ;
403401 const testDriverConnectionSpy = jest . spyOn ( oapi , 'testDriverConnection' ) ;
404402 oapi . seenDataSources = [ 'default' ] ;
405-
403+
406404 expect ( core . optsHandler . configuredForScheduledRefresh ( ) ) . toBe ( true ) ;
407405 expect ( opts . rollupOnlyMode ) . toBe ( false ) ;
408406 expect ( opts . preAggregationsOptions . externalRefresh ) . toBe ( false ) ;
@@ -503,7 +501,7 @@ describe('OptsHandler class', () => {
503501 } ) ;
504502
505503 const opts = ( < any > core . getOrchestratorApi ( < RequestContext > { } ) ) . options ;
506-
504+
507505 expect ( opts . queryCacheOptions . queueOptions ) . toBeDefined ( ) ;
508506 expect ( typeof opts . queryCacheOptions . queueOptions ) . toEqual ( 'function' ) ;
509507 expect ( await opts . queryCacheOptions . queueOptions ( ) ) . toEqual ( {
@@ -533,7 +531,7 @@ describe('OptsHandler class', () => {
533531 } ) ;
534532
535533 const opts = ( < any > core . getOrchestratorApi ( < RequestContext > { } ) ) . options ;
536-
534+
537535 expect ( opts . queryCacheOptions . queueOptions ) . toBeDefined ( ) ;
538536 expect ( typeof opts . queryCacheOptions . queueOptions ) . toEqual ( 'function' ) ;
539537 expect ( await opts . queryCacheOptions . queueOptions ( ) ) . toEqual ( {
@@ -563,7 +561,7 @@ describe('OptsHandler class', () => {
563561 } ) ;
564562
565563 const opts = ( < any > core . getOrchestratorApi ( < RequestContext > { } ) ) . options ;
566-
564+
567565 expect ( opts . queryCacheOptions . queueOptions ) . toBeDefined ( ) ;
568566 expect ( typeof opts . queryCacheOptions . queueOptions ) . toEqual ( 'function' ) ;
569567 expect ( await opts . queryCacheOptions . queueOptions ( ) ) . toEqual ( {
@@ -593,7 +591,7 @@ describe('OptsHandler class', () => {
593591 } ) ;
594592
595593 const opts = ( < any > core . getOrchestratorApi ( < RequestContext > { } ) ) . options ;
596-
594+
597595 expect ( opts . queryCacheOptions . queueOptions ) . toBeDefined ( ) ;
598596 expect ( typeof opts . queryCacheOptions . queueOptions ) . toEqual ( 'function' ) ;
599597 expect ( await opts . queryCacheOptions . queueOptions ( ) ) . toEqual ( {
@@ -623,7 +621,7 @@ describe('OptsHandler class', () => {
623621 } ) ;
624622
625623 const opts = ( < any > core . getOrchestratorApi ( < RequestContext > { } ) ) . options ;
626-
624+
627625 expect ( opts . queryCacheOptions . queueOptions ) . toBeDefined ( ) ;
628626 expect ( typeof opts . queryCacheOptions . queueOptions ) . toEqual ( 'function' ) ;
629627 expect ( await opts . queryCacheOptions . queueOptions ( ) ) . toEqual ( {
@@ -667,7 +665,7 @@ describe('OptsHandler class', () => {
667665 } ) ;
668666
669667 const opts = ( < any > core . getOrchestratorApi ( < RequestContext > { } ) ) . options ;
670-
668+
671669 expect ( opts . queryCacheOptions . queueOptions ) . toBeDefined ( ) ;
672670 expect ( typeof opts . queryCacheOptions . queueOptions ) . toEqual ( 'function' ) ;
673671 expect ( await opts . queryCacheOptions . queueOptions ( ) ) . toEqual ( {
@@ -715,7 +713,7 @@ describe('OptsHandler class', () => {
715713 } ) ;
716714 opts = ( < any > core . getOrchestratorApi ( < RequestContext > { } ) ) . options ;
717715 driver = < any > ( await core . resolveDriver ( < DriverContext > { } , opts ) ) ;
718-
716+
719717 expect ( driver . pool . options . max ) . toEqual ( 2 * ( concurrency1 + concurrency2 ) ) ;
720718 expect ( driver . testConnectionTimeout ( ) ) . toEqual ( testConnectionTimeout ) ;
721719
@@ -766,7 +764,7 @@ describe('OptsHandler class', () => {
766764 } ) ;
767765 opts = ( < any > core . getOrchestratorApi ( < RequestContext > { } ) ) . options ;
768766 driver = < any > ( await core . resolveDriver ( < DriverContext > { } ) ) ;
769-
767+
770768 expect ( driver . pool . options . max ) . toEqual ( 8 ) ;
771769 expect ( driver . testConnectionTimeout ( ) ) . toEqual ( 10000 ) ;
772770 } ) ;
0 commit comments