test(cli): fix flaky QuotaDisplay snapshot and env leakage in StatusDisplay

This commit is contained in:
jacob314
2026-03-02 12:22:11 -08:00
parent dc6741097c
commit 355f5c070d
20 changed files with 246 additions and 118 deletions
@@ -3107,7 +3107,6 @@ describe('PolicyEngine', () => {
expect(checkers[0].checker.name).toBe('c2');
});
});
describe('Tool Annotations', () => {
it('should match tools by semantic annotations', async () => {
engine = new PolicyEngine({
@@ -3171,7 +3170,6 @@ describe('PolicyEngine', () => {
).toBe(PolicyDecision.ALLOW);
});
});
describe('hook checkers', () => {
it('should add and retrieve hook checkers in priority order', () => {
engine.addHookChecker({
@@ -2053,7 +2053,6 @@ describe('mcp-client', () => {
expect(callArgs.env!['GEMINI_CLI_EXT_VAR']).toBe('ext-value');
expect(callArgs.env!['RESOLVED_VAR']).toBe('ext-value');
});
it('should expand environment variables in mcpServerConfig.env and not redact them', async () => {
const mockedTransport = vi
.spyOn(SdkClientStdioLib, 'StdioClientTransport')