Skip to content

Commit 88e884b

Browse files
committed
fix: fix flaky test
This test was failing because the context project's entropy did not match what the patched function received. Matching on the uri instead(which is what actually identifies the project) fixes the test.
1 parent a4370d5 commit 88e884b

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

apps/expert/test/expert/provider/handlers/find_references_test.exs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,12 @@ defmodule Expert.Provider.Handlers.FindReferencesTest do
5353

5454
describe "find references" do
5555
test "returns locations that the entity returns", %{project: project, uri: uri} do
56-
patch(EngineApi, :references, fn ^project, %Analysis{document: document}, _position, _ ->
56+
project_uri = project.root_uri
57+
58+
patch(EngineApi, :references, fn %{root_uri: ^project_uri},
59+
%Analysis{document: document},
60+
_position,
61+
_ ->
5762
locations = [
5863
Location.new(
5964
Document.Range.new(

0 commit comments

Comments
 (0)