fix: skip problematic integration test (#1065)

This commit is contained in:
tanzhenxin
2025-11-19 11:55:19 +08:00
committed by GitHub
parent d0e76c76a8
commit 97bf48b14c

View File

@@ -66,47 +66,43 @@ describe('Interactive Mode', () => {
}, },
); );
it.skipIf(process.platform === 'win32')( it.skip('should handle compression failure on token inflation', async () => {
'should handle compression failure on token inflation', await rig.setup('interactive-compress-test', {
async () => { settings: {
await rig.setup('interactive-compress-test', { security: {
settings: { auth: {
security: { selectedType: 'openai',
auth: {
selectedType: 'openai',
},
}, },
}, },
}); },
});
const { ptyProcess } = rig.runInteractive(); const { ptyProcess } = rig.runInteractive();
let fullOutput = ''; let fullOutput = '';
ptyProcess.onData((data) => (fullOutput += data)); ptyProcess.onData((data) => (fullOutput += data));
// Wait for the app to be ready // Wait for the app to be ready
const isReady = await rig.waitForText('Type your message', 25000); const isReady = await rig.waitForText('Type your message', 25000);
expect( expect(isReady, 'CLI did not start up in interactive mode correctly').toBe(
isReady, true,
'CLI did not start up in interactive mode correctly', );
).toBe(true);
await type(ptyProcess, '/compress'); await type(ptyProcess, '/compress');
await new Promise((resolve) => setTimeout(resolve, 1000)); await new Promise((resolve) => setTimeout(resolve, 1000));
await type(ptyProcess, '\r'); await type(ptyProcess, '\r');
const foundEvent = await rig.waitForTelemetryEvent( const foundEvent = await rig.waitForTelemetryEvent(
'chat_compression', 'chat_compression',
90000, 90000,
); );
expect(foundEvent).toBe(true); expect(foundEvent).toBe(true);
const compressionFailed = await rig.waitForText( const compressionFailed = await rig.waitForText(
'Nothing to compress.', 'Nothing to compress.',
25000, 25000,
); );
expect(compressionFailed).toBe(true); expect(compressionFailed).toBe(true);
}, });
);
}); });