Skip to content
TypeScript

test(server): allow either valid file-search match (#9720)

Theo Browne8ccb933a8aae
diff --git a/apps/server/src/workspace/WorkspaceEntries.test.ts b/apps/server/src/workspace/WorkspaceEntries.test.ts
index d47aaaec826..ff3343c3713 100644
--- a/apps/server/src/workspace/WorkspaceEntries.test.ts
+++ b/apps/server/src/workspace/WorkspaceEntries.test.ts
@@ -218,7 +218,10 @@ it.layer(TestLayer, { excludeTestServices: true })("WorkspaceEntries", (it) => {
kind: "file",
});
- expect(result.entries).toEqual([{ path: "src/index.ts", kind: "file" }]);
+ // Native ranking can put either matching file first.
+ expect(result.entries).toHaveLength(1);
+ expect(result.entries[0]?.kind).toBe("file");
+ expect(["src/index.ts", "src/internal.ts"]).toContain(result.entries[0]?.path);
expect(result.truncated).toBe(true);
}),
);