Make glob.test.ts win compatible. (#4891)
This commit is contained in:
parent
4c144e616d
commit
be898710fe
|
@ -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'),
|
||||||
|
);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue