Skip to content

Commit 53e137a

Browse files
committed
test: fix list test for new default sort order
Update test to explicitly use sort='name' since the default changed from alphabetical to most-recently-modified.
1 parent 63b25a5 commit 53e137a

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

test/core/list.test.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -115,19 +115,19 @@ Regular text that should be ignored
115115
expect(logOutput.some(line => line.includes('no-tasks') && line.includes('No tasks'))).toBe(true);
116116
});
117117

118-
it('should sort changes alphabetically', async () => {
118+
it('should sort changes alphabetically when sort=name', async () => {
119119
const changesDir = path.join(tempDir, 'openspec', 'changes');
120120
await fs.mkdir(path.join(changesDir, 'zebra'), { recursive: true });
121121
await fs.mkdir(path.join(changesDir, 'alpha'), { recursive: true });
122122
await fs.mkdir(path.join(changesDir, 'middle'), { recursive: true });
123123

124124
const listCommand = new ListCommand();
125-
await listCommand.execute(tempDir);
125+
await listCommand.execute(tempDir, 'changes', { sort: 'name' });
126126

127-
const changeLines = logOutput.filter(line =>
127+
const changeLines = logOutput.filter(line =>
128128
line.includes('alpha') || line.includes('middle') || line.includes('zebra')
129129
);
130-
130+
131131
expect(changeLines[0]).toContain('alpha');
132132
expect(changeLines[1]).toContain('middle');
133133
expect(changeLines[2]).toContain('zebra');

0 commit comments

Comments
 (0)