-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Expand file tree
/
Copy pathcontentGating.spec.ts
More file actions
30 lines (26 loc) · 1.28 KB
/
contentGating.spec.ts
File metadata and controls
30 lines (26 loc) · 1.28 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import { describe, expect, it } from 'vitest';
import { CapturingOTelService } from './capturingOTelService';
/**
* CapturingOTelService correctly exposes the captureContent config flag.
*
* Integration tests that exercise the real ToolCallingLoop code path live in
* src/extension/intents/test/node/toolCallingLoopContentGating.spec.ts.
*/
describe('CapturingOTelService captureContent config', () => {
it('defaults captureContent to false when OTEL is enabled without explicit flag', () => {
const otel = new CapturingOTelService();
expect(otel.config.captureContent).toBe(false);
});
it('respects captureContent=true override', () => {
const otel = new CapturingOTelService({ captureContent: true });
expect(otel.config.captureContent).toBe(true);
});
it('respects captureContent=false override', () => {
const otel = new CapturingOTelService({ captureContent: false });
expect(otel.config.captureContent).toBe(false);
});
});