Make glob.test.ts win compatible. (#4891)

This commit is contained in:
Tommaso Sciortino 2025-07-25 14:30:39 -07:00 committed by GitHub
parent 4c144e616d
commit be898710fe
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 12 additions and 4 deletions

View File

@ -150,11 +150,19 @@ describe('GlobTool', () => {
expect(typeof llmContent).toBe('string'); expect(typeof llmContent).toBe('string');
const filesListed = llmContent const filesListed = llmContent
.substring(llmContent.indexOf(':') + 1)
.trim() .trim()
.split('\n'); .split(/\r?\n/)
expect(filesListed[0]).toContain(path.join(tempRootDir, 'newer.sortme')); .slice(1)
expect(filesListed[1]).toContain(path.join(tempRootDir, 'older.sortme')); .map((line) => line.trim())
.filter(Boolean);
expect(filesListed).toHaveLength(2);
expect(path.resolve(filesListed[0])).toBe(
path.resolve(tempRootDir, 'newer.sortme'),
);
expect(path.resolve(filesListed[1])).toBe(
path.resolve(tempRootDir, 'older.sortme'),
);
}); });
}); });