mirror of
https://github.com/Fission-AI/OpenSpec.git
synced 2026-09-14 20:16:53 +08:00
622c509a13
* fix(telemetry): honor telemetry.enabled in global config Honor the documented global config opt-out while preserving environment and CI overrides. Keep runtime-managed telemetry identity fields intact and apply the same privacy setting to update checks. AI: agentic * docs(telemetry): address automated review feedback Document the full opt-out behavior in the changeset and describe the new test helper so automated documentation coverage meets the project threshold. AI: agentic --------- Co-authored-by: Marcus Don <marcus.don@team.blue>
24 lines
605 B
TypeScript
24 lines
605 B
TypeScript
import { describe, it, expect } from 'vitest';
|
|
|
|
import { isCiEnvironment } from '../../src/utils/ci.js';
|
|
|
|
describe('isCiEnvironment', () => {
|
|
it('returns false when CI is unset', () => {
|
|
expect(isCiEnvironment({})).toBe(false);
|
|
});
|
|
|
|
it.each(['true', '1', 'yes', 'TRUE', 'on', 'ci'])(
|
|
'returns true for CI=%s',
|
|
(value) => {
|
|
expect(isCiEnvironment({ CI: value })).toBe(true);
|
|
}
|
|
);
|
|
|
|
it.each(['false', '0', 'no', 'off', '', ' FALSE '])(
|
|
'returns false for explicit off value CI=%s',
|
|
(value) => {
|
|
expect(isCiEnvironment({ CI: value })).toBe(false);
|
|
}
|
|
);
|
|
});
|