forked from google-gemini/gemini-cli
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathresume_repro.test.ts
More file actions
42 lines (33 loc) · 1.12 KB
/
Copy pathresume_repro.test.ts
File metadata and controls
42 lines (33 loc) · 1.12 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
/**
* @license
* Copyright 2025 Google LLC
* SPDX-License-Identifier: Apache-2.0
*/
import { describe, it, expect, beforeEach, afterEach } from 'vitest';
import { TestRig } from './test-helper.js';
import * as path from 'node:path';
import { fileURLToPath } from 'node:url';
const __dirname = path.dirname(fileURLToPath(import.meta.url));
describe('resume-repro', () => {
let rig: TestRig;
beforeEach(() => {
rig = new TestRig();
});
afterEach(async () => await rig.cleanup());
it('should be able to resume a session without "Storage must be initialized before use"', async () => {
const responsesPath = path.join(__dirname, 'resume_repro.responses');
await rig.setup('should be able to resume a session', {
fakeResponsesPath: responsesPath,
});
// 1. First run to create a session
await rig.run({
args: 'hello',
});
// 2. Second run with --resume latest
// This should NOT fail with "Storage must be initialized before use"
const result = await rig.run({
args: ['--resume', 'latest', 'continue'],
});
expect(result).toContain('Session started');
});
});