Skip to content

Commit ab80bf7

Browse files
maystudiosclaude
andcommitted
fix(phase-3): resolve lint warnings in statusline-cache tests
Co-Authored-By: Claude <noreply@anthropic.com>
1 parent b80de93 commit ab80bf7

1 file changed

Lines changed: 12 additions & 12 deletions

File tree

packages/cli/tests/unit/statusline-cache.test.ts

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,9 @@ describe('write then read', () => {
3535
const result = readStatuslineCache(tmpDir);
3636

3737
expect(result).not.toBeNull();
38-
expect(result!.phase).toBe(3);
39-
expect(result!.status).toBe('Testing');
40-
expect(result!.updatedAt).toBeDefined();
38+
expect(result?.phase).toBe(3);
39+
expect(result?.status).toBe('Testing');
40+
expect(result?.updatedAt).toBeDefined();
4141
});
4242

4343
it('handles write with only phase', () => {
@@ -46,8 +46,8 @@ describe('write then read', () => {
4646
const result = readStatuslineCache(tmpDir);
4747

4848
expect(result).not.toBeNull();
49-
expect(result!.phase).toBe(1);
50-
expect(result!.status).toBeUndefined();
49+
expect(result?.phase).toBe(1);
50+
expect(result?.status).toBeUndefined();
5151
});
5252

5353
it('handles write with only status', () => {
@@ -56,8 +56,8 @@ describe('write then read', () => {
5656
const result = readStatuslineCache(tmpDir);
5757

5858
expect(result).not.toBeNull();
59-
expect(result!.phase).toBeUndefined();
60-
expect(result!.status).toBe('Planning');
59+
expect(result?.phase).toBeUndefined();
60+
expect(result?.status).toBe('Planning');
6161
});
6262

6363
it('creates .claude/maxsim directory if it does not exist', () => {
@@ -67,7 +67,7 @@ describe('write then read', () => {
6767

6868
const result = readStatuslineCache(emptyDir);
6969
expect(result).not.toBeNull();
70-
expect(result!.phase).toBe(2);
70+
expect(result?.phase).toBe(2);
7171
} finally {
7272
fs.rmSync(emptyDir, { recursive: true, force: true });
7373
}
@@ -107,7 +107,7 @@ describe('stale cache (> 120s)', () => {
107107
const result = readStatuslineCache(tmpDir);
108108

109109
expect(result).not.toBeNull();
110-
expect(result!.phase).toBe(2);
110+
expect(result?.phase).toBe(2);
111111
});
112112
});
113113

@@ -212,8 +212,8 @@ describe('Smart-Hybrid TTL', () => {
212212
const result = readStatuslineCache(tmpDir);
213213

214214
expect(result).not.toBeNull();
215-
expect(result!.phase).toBe(3);
216-
expect(result!.status).toBe('In Progress');
215+
expect(result?.phase).toBe(3);
216+
expect(result?.status).toBe('In Progress');
217217
});
218218

219219
it('uses 120s TTL for non-"In Progress" status', () => {
@@ -229,7 +229,7 @@ describe('Smart-Hybrid TTL', () => {
229229
const result = readStatuslineCache(tmpDir);
230230

231231
expect(result).not.toBeNull();
232-
expect(result!.status).toBe('Done');
232+
expect(result?.status).toBe('Done');
233233
});
234234

235235
it('applies shorter TTL when status contains "In Progress" as substring', () => {

0 commit comments

Comments
 (0)