Skip to content

Commit 1185291

Browse files
committed
test(server): allow either valid file-search match
1 parent 9510390 commit 1185291

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

‎apps/server/src/workspace/WorkspaceEntries.test.ts‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,10 @@ it.layer(TestLayer, { excludeTestServices: true })("WorkspaceEntries", (it) => {
218218
kind: "file",
219219
});
220220

221-
expect(result.entries).toEqual([{ path: "src/index.ts", kind: "file" }]);
221+
// Native ranking can put either matching file first.
222+
expect(result.entries).toHaveLength(1);
223+
expect(result.entries[0]?.kind).toBe("file");
224+
expect(["src/index.ts", "src/internal.ts"]).toContain(result.entries[0]?.path);
222225
expect(result.truncated).toBe(true);
223226
}),
224227
);

0 commit comments

Comments
 (0)