mirror of
https://github.com/RooVetGit/Roo-Code.git
synced 2026-09-07 08:26:51 +00:00
fix: make qdrant-client tests cross-platform compatible
- Updated path expectations in deletePointsByMultipleFilePaths tests to handle both Unix and Windows path formats - Changed stringContaining() to stringMatching() with regex patterns that accept both / and \ path separators - Fixed absolute path regex to handle both Unix (/path) and Windows (C:\path) formats - Resolves Windows platform-unit-test failures in CI
This commit is contained in:
parent
b2e96eb3d6
commit
cb0e900d6c
1 changed files with 6 additions and 5 deletions
|
|
@ -1583,7 +1583,7 @@ describe("QdrantVectorStore", () => {
|
|||
{
|
||||
key: "filePath",
|
||||
match: {
|
||||
value: expect.stringContaining("src/test.ts"),
|
||||
value: expect.stringMatching(/.*[\/\\]src[\/\\]test\.ts$/),
|
||||
},
|
||||
},
|
||||
],
|
||||
|
|
@ -1605,19 +1605,19 @@ describe("QdrantVectorStore", () => {
|
|||
{
|
||||
key: "filePath",
|
||||
match: {
|
||||
value: expect.stringContaining("src/test1.ts"),
|
||||
value: expect.stringMatching(/.*[\/\\]src[\/\\]test1\.ts$/),
|
||||
},
|
||||
},
|
||||
{
|
||||
key: "filePath",
|
||||
match: {
|
||||
value: expect.stringContaining("src/test2.ts"),
|
||||
value: expect.stringMatching(/.*[\/\\]src[\/\\]test2\.ts$/),
|
||||
},
|
||||
},
|
||||
{
|
||||
key: "filePath",
|
||||
match: {
|
||||
value: expect.stringContaining("src/test3.ts"),
|
||||
value: expect.stringMatching(/.*[\/\\]src[\/\\]test3\.ts$/),
|
||||
},
|
||||
},
|
||||
]),
|
||||
|
|
@ -1751,7 +1751,8 @@ describe("QdrantVectorStore", () => {
|
|||
// Both paths should be normalized to absolute paths
|
||||
expect(deleteCall.filter.should).toHaveLength(2)
|
||||
deleteCall.filter.should.forEach((filter: any) => {
|
||||
expect(filter.match.value).toMatch(/^\/.*\/src\/test.*\.ts$/) // Should be absolute paths
|
||||
// Should be absolute paths - either Unix style (/path) or Windows style (C:\path)
|
||||
expect(filter.match.value).toMatch(/^([a-zA-Z]:[\/\\]|[\/\\]).*[\/\\]src[\/\\]test.*\.ts$/)
|
||||
})
|
||||
})
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue