Simplify auth in interactive tests. (#10921)

This commit is contained in:
Tommaso Sciortino
2025-10-10 14:50:14 -07:00
committed by GitHub
parent a6e00d9183
commit a64bb433b0
4 changed files with 48 additions and 148 deletions
@@ -21,8 +21,7 @@ describe('Interactive Mode', () => {
it('should trigger chat compression with /compress command', async () => {
await rig.setup('interactive-compress-test');
const { ptyProcess } = rig.runInteractive();
await rig.ensureReadyForInput(ptyProcess);
const ptyProcess = await rig.runInteractive();
const longPrompt =
'Dont do anything except returning a 1000 token long paragragh with the <name of the scientist who discovered theory of relativity> at the end to indicate end of response. This is a moderately long sentence.';
@@ -50,18 +49,12 @@ describe('Interactive Mode', () => {
it.skip('should handle compression failure on token inflation', async () => {
await rig.setup('interactive-compress-test');
const { ptyProcess } = rig.runInteractive();
await rig.ensureReadyForInput(ptyProcess);
const ptyProcess = await rig.runInteractive();
await type(ptyProcess, '/compress');
await new Promise((resolve) => setTimeout(resolve, 100));
await type(ptyProcess, '\r');
const compressionFailed = await rig.waitForText(
'compression was not beneficial',
25000,
);
expect(compressionFailed).toBe(true);
await rig.waitForText('compression was not beneficial', 25000);
});
});