chore: fix tests

This commit is contained in:
Igor Randjelovic
2021-03-31 21:33:30 +02:00
parent a7771cc8ab
commit de13357a09
3 changed files with 23 additions and 16 deletions

View File

@ -16,10 +16,10 @@ function getCLILib() {
*
* @param {string} key The key to get from the config. Supports dot-notation.
*/
export function getValue<T = any>(key: string): T {
export function getValue<T = any>(key: string, defaultValue?: any): T {
const lib = getCLILib();
return (lib.projectConfigService as { getValue(key: string): T }).getValue(
key
);
return (lib.projectConfigService as {
getValue(key: string, defaultValue?: any): T;
}).getValue(key, defaultValue);
}