@@ -13,30 +13,35 @@ describe('config', () => {
1313
1414 it ( `loads mysql config synchronously` , ( ) => {
1515 const cfg = Config . getSync ( 'mysql' )
16+ delete cfg . password
1617 assert . deepEqual ( cfg , mysqlCfg )
1718 } )
1819
1920 it ( `loads mysql config (from cache)` , async ( ) => {
2021 process . env . NODE_DEBUG = 1
2122 const cfg = await Config . get ( 'mysql' )
23+ delete cfg . password
2224 assert . deepEqual ( cfg , mysqlCfg )
2325 process . env . NODE_DEBUG = ''
2426 } )
2527
2628 it ( `loads http config` , async ( ) => {
2729 const cfg = await Config . get ( 'http' )
2830 const { tls, ...rest } = cfg
31+ delete rest . password
2932 assert . deepEqual ( rest , httpCfg )
3033 } )
3134
3235 it ( `loads http config synchronously` , ( ) => {
3336 const cfg = Config . getSync ( 'http' )
3437 const { tls, ...rest } = cfg
38+ delete rest . password
3539 assert . deepEqual ( rest , httpCfg )
3640 } )
3741
3842 it ( `loads tls from conf.d/*.pem when present` , async ( ) => {
3943 const cfg = await Config . get ( 'http' )
44+ delete cfg . password
4045 if ( ! cfg . tls ) return // no PEM on this host — skip
4146 assert . match ( cfg . tls . key , / - - - - - B E G I N .* P R I V A T E K E Y - - - - - / )
4247 assert . match ( cfg . tls . cert , / - - - - - B E G I N C E R T I F I C A T E - - - - - / )
@@ -81,5 +86,6 @@ const httpCfg = {
8186 isSameSite : 'Strict' ,
8287 isSecure : true ,
8388 isHttpOnly : false ,
89+ password : '' ,
8490 } ,
8591}
0 commit comments