File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -12,12 +12,12 @@ describe(`AppConfig`, () => {
1212 it ( `config correctly returns proper config` , async ( ) => {
1313 // console.log(`config: ${JSON.stringify(config, null, 2)}`);
1414 // this test relies on devel having appConfig.search.index
15- const hasIndex = config . has ( 'appConfig.search.index' ) ;
15+ const hasIndex = AppConfig . has ( 'appConfig.search.index' ) ;
1616 expect ( hasIndex ) . toBeTruthy ( ) ;
17- const index = config . get ( 'appConfig.search.index' ) ;
17+ const index = AppConfig . get ( 'appConfig.search.index' ) ;
1818 // console.log(`info: ${JSON.stringify(info, null, 2)}`)
1919 // expect(index).toBe('fixtures-search-baseline-1008');
20- expect ( config . get ( 'appConfig.search.minServer' ) . length ) . toBe ( 1 ) ;
20+ expect ( AppConfig . get ( 'appConfig.search.minServer' ) ? .length ) . toBe ( 1 ) ;
2121 } ) ;
2222
2323
Original file line number Diff line number Diff line change @@ -64,7 +64,7 @@ export class AppConfig {
6464 // static getSecret(secretKey:string): string {}
6565
6666
67- /** sets `"path": "value"` to config, specifically, to `appConfig.path`
67+ /** sets `{ "path": "value"} ` to config, specifically, to `appConfig.path`
6868 * Note this does not actually change the values in the file, but only in
6969 * the in-memory "cache"
7070 * @param path the path to the key in appConfig. Do not use `{}:.;` in the key name,
@@ -73,7 +73,6 @@ export class AppConfig {
7373 * `appConfig`
7474 */
7575 static set ( path :string , value : string ) : void {
76- config . appConfig [ path ] = value
77- // AppConfig._sVariables[path] = variable
76+ config [ 'appConfig' ] [ path ] = value
7877 }
7978}
You can’t perform that action at this time.
0 commit comments