@@ -10,21 +10,13 @@ describe('InsightsModulePreInit', () => {
10
10
it ( 'should return false if instance type is not "main"' , ( ) => {
11
11
const ctx : ModulePreInitContext = {
12
12
instance : mock < InstanceSettings > ( { instanceType : 'worker' } ) ,
13
- database : mock < DatabaseConfig > ( { type : 'sqlite' , sqlite : { poolSize : 10 } } ) ,
13
+ database : mock < DatabaseConfig > ( { type : 'sqlite' } ) ,
14
14
} ;
15
15
expect ( shouldLoadModule ( ctx ) ) . toBe ( false ) ;
16
16
} ) ;
17
17
18
- it ( 'should return false if database type is "sqlite" and poolSize is < 1' , ( ) => {
19
- const ctx : ModulePreInitContext = {
20
- instance : mock < InstanceSettings > ( { instanceType : 'main' } ) ,
21
- database : mock < DatabaseConfig > ( { type : 'sqlite' , sqlite : { poolSize : 0 } } ) ,
22
- } ;
23
- expect ( shouldLoadModule ( ctx ) ) . toBe ( false ) ;
24
- } ) ;
25
-
26
- it . each ( [ 'postgresdb' , 'mariadb' , 'mysqldb' ] ) (
27
- 'should return true if instance type is "main" and database is not sqlite' ,
18
+ it . each ( [ 'postgresdb' , 'mariadb' , 'mysqldb' , 'sqlite' ] ) (
19
+ 'should return true if instance type is "main"' ,
28
20
( dbType : 'postgresdb' | 'mysqldb' | 'sqlite' | 'mariadb' ) => {
29
21
const ctx : ModulePreInitContext = {
30
22
instance : mock < InstanceSettings > ( { instanceType : 'main' } ) ,
@@ -33,12 +25,4 @@ describe('InsightsModulePreInit', () => {
33
25
expect ( shouldLoadModule ( ctx ) ) . toBe ( true ) ;
34
26
} ,
35
27
) ;
36
-
37
- it ( 'should return true if instance type is "main" and sqlite poolSize is >= 1' , ( ) => {
38
- const ctx : ModulePreInitContext = {
39
- instance : mock < InstanceSettings > ( { instanceType : 'main' } ) ,
40
- database : mock < DatabaseConfig > ( { type : 'sqlite' , sqlite : { poolSize : 1 } } ) ,
41
- } ;
42
- expect ( shouldLoadModule ( ctx ) ) . toBe ( true ) ;
43
- } ) ;
44
28
} ) ;
0 commit comments