Files
fission-ai__openspec/test/utils/ci.test.ts
FasterPHP 622c509a13 fix(telemetry): honor telemetry.enabled in global config (#1513)
* 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>
2026-08-05 15:23:41 +00:00

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);
}
);
});