Skip to content

Commit

Permalink
test: update signal in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
adamborowski committed Jan 16, 2023
1 parent 1f91cf0 commit d9ace2b
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import userEvent from "@testing-library/user-event";
import { withFailure } from "../../../../common/api/clients/development/withFailure";

describe("RepositorySearchPage.connected", () => {

it("should allow to search with query and re-search after changing the query", async () => {
render(
<RepositorySearchPageConnected searchClient={inMemorySearchClient} />,
Expand Down Expand Up @@ -97,10 +96,10 @@ describe("RepositorySearchPage.connected", () => {
act(() => void userEvent.click(screen.getByText("Search")));

expect(
(searchClient.search.mock.calls[0][1] as AbortController).signal.aborted
(searchClient.search.mock.calls[0][1] as AbortSignal).aborted
).toBeTruthy();
expect(
(searchClient.search.mock.calls[1][1] as AbortController).signal.aborted
(searchClient.search.mock.calls[1][1] as AbortSignal).aborted
).toBeFalsy();
});
});

0 comments on commit d9ace2b

Please sign in to comment.