Skip to content

Commit 4c64e51

Browse files
committed
Fix tests
1 parent 3903d79 commit 4c64e51

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/lib/config.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
export interface CountlyConfig {
77
serverUrl: string;
88
timeout?: number;
9+
authToken?: string;
910
}
1011

1112
export interface ServerEnvironment {
@@ -82,7 +83,7 @@ export function validateServerUrl(url: string): boolean {
8283
*/
8384
export function buildConfig(
8485
env: ServerEnvironment = process.env,
85-
_authToken?: string,
86+
authToken?: string,
8687
testMode = false
8788
): CountlyConfig {
8889
const config = loadConfigFromEnv(env);
@@ -95,5 +96,6 @@ export function buildConfig(
9596
);
9697
}
9798

98-
return config;
99+
// Return config with authToken if provided
100+
return authToken ? { ...config, authToken } : config;
99101
}

0 commit comments

Comments
 (0)