Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(ts/createDetourMachine): default fetchNearestIntersection result to an Em Dash on error #2975

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

firestack
Copy link
Member

@firestack firestack force-pushed the kf/asn/em-dash-intersection branch from 16477f2 to 7496d2c Compare March 11, 2025 20:04
@firestack firestack force-pushed the kf/asn/em-dash-intersection branch from 7496d2c to 5cbc5e7 Compare March 11, 2025 20:49
@@ -83,7 +83,7 @@ describe("DiversionPage autosave flow", () => {
})

await waitFor(() => {
expect(putDetourUpdate).toHaveBeenCalledTimes(3)
expect(putDetourUpdate).toHaveBeenCalledTimes(5)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not quite sure why this changed, I tried to figure out if there was a way to do "at least 2 times" but didn't see anything.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

okay actually I think this changed due to doing "set.nearest-intersection-fallback" in Pick Start Point

@@ -40,7 +40,7 @@ beforeEach(() => {
jest.mocked(getTestGroups).mockReturnValue([])
jest
.mocked(fetchNearestIntersection)
.mockResolvedValue("Returned Intersection")
.mockReturnValue(neverPromise())
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The intersection isn't used in these tests and it's just easier to have the promise never return, because otherwise you run into "An update inside a test was not wrapped in act(...)."

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant