summaryrefslogtreecommitdiff
path: root/packages/core/src/test-utils
diff options
context:
space:
mode:
authorRichie Foreman <[email protected]>2025-08-12 14:31:59 -0400
committerGitHub <[email protected]>2025-08-12 18:31:59 +0000
commit7cc6b8c270a67803f9387eeead0d3d7ac914303a (patch)
tree982fa440c974512961670cb4ee43a62641950ce6 /packages/core/src/test-utils
parentc5c6966d08b042b3b287c1909afa60f950bca147 (diff)
chore(usage telemetry): Freshen up Clearcut logging (#6013)
Co-authored-by: christine betts <[email protected]> Co-authored-by: Jacob Richman <[email protected]> Co-authored-by: matt korwel <[email protected]>
Diffstat (limited to 'packages/core/src/test-utils')
-rw-r--r--packages/core/src/test-utils/config.ts36
1 files changed, 36 insertions, 0 deletions
diff --git a/packages/core/src/test-utils/config.ts b/packages/core/src/test-utils/config.ts
new file mode 100644
index 00000000..08faf8c3
--- /dev/null
+++ b/packages/core/src/test-utils/config.ts
@@ -0,0 +1,36 @@
+/**
+ * @license
+ * Copyright 2025 Google LLC
+ * SPDX-License-Identifier: Apache-2.0
+ */
+
+import { Config, ConfigParameters } from '../config/config.js';
+
+/**
+ * Default parameters used for {@link FAKE_CONFIG}
+ */
+export const DEFAULT_CONFIG_PARAMETERS: ConfigParameters = {
+ usageStatisticsEnabled: true,
+ debugMode: false,
+ sessionId: 'test-session-id',
+ proxy: undefined,
+ model: 'gemini-9001-super-duper',
+ targetDir: '/',
+ cwd: '/',
+};
+
+/**
+ * Produces a config. Default paramters are set to
+ * {@link DEFAULT_CONFIG_PARAMETERS}, optionally, fields can be specified to
+ * override those defaults.
+ */
+export function makeFakeConfig(
+ config: Partial<ConfigParameters> = {
+ ...DEFAULT_CONFIG_PARAMETERS,
+ },
+): Config {
+ return new Config({
+ ...DEFAULT_CONFIG_PARAMETERS,
+ ...config,
+ });
+}