mirror of
https://github.com/jupyterhub/jupyterhub.git
synced 2025-10-18 23:42:59 +00:00
update deprecated toBeCalledWith -> toHaveBeenCalledWith
This commit is contained in:
@@ -139,7 +139,7 @@ test("Interacting with PaginationFooter causes page refresh", async () => {
|
||||
render(groupsJsx(updateGroupsSpy));
|
||||
});
|
||||
|
||||
expect(updateGroupsSpy).toBeCalledWith(0, 2);
|
||||
expect(updateGroupsSpy).toHaveBeenCalledWith(0, 2);
|
||||
|
||||
var lastState =
|
||||
mockReducers.mock.results[mockReducers.mock.results.length - 1].value;
|
||||
@@ -153,5 +153,5 @@ test("Interacting with PaginationFooter causes page refresh", async () => {
|
||||
});
|
||||
expect(searchParams.get("offset")).toEqual("2");
|
||||
// FIXME: useSelector mocks prevent updateGroups from being called
|
||||
// expect(updateGroupsSpy).toBeCalledWith(2, 2);
|
||||
// expect(updateGroupsSpy).toHaveBeenCalledWith(2, 2);
|
||||
});
|
||||
|
@@ -591,14 +591,14 @@ test("Search for user calls updateUsers with name filter", async () => {
|
||||
expect(searchParams.get("offset")).toEqual(null);
|
||||
// FIXME: useSelector mocks prevent updateUsers from being called
|
||||
// expect(mockUpdateUsers.mock.calls).toHaveLength(2);
|
||||
// expect(mockUpdateUsers).toBeCalledWith(0, 100, "a");
|
||||
// expect(mockUpdateUsers).toHaveBeenCalledWith(0, 100, "a");
|
||||
await user.type(search, "b");
|
||||
expect(search.value).toEqual("ab");
|
||||
await act(async () => {
|
||||
jest.runAllTimers();
|
||||
});
|
||||
expect(searchParams.get("name_filter")).toEqual("ab");
|
||||
// expect(mockUpdateUsers).toBeCalledWith(0, 100, "ab");
|
||||
// expect(mockUpdateUsers).toHaveBeenCalledWith(0, 100, "ab");
|
||||
});
|
||||
|
||||
test("Interacting with PaginationFooter requests page update", async () => {
|
||||
@@ -606,7 +606,7 @@ test("Interacting with PaginationFooter requests page update", async () => {
|
||||
render(serverDashboardJsx());
|
||||
});
|
||||
|
||||
expect(mockUpdateUsers).toBeCalledWith(defaultUpdateUsersParams);
|
||||
expect(mockUpdateUsers).toHaveBeenCalledWith(defaultUpdateUsersParams);
|
||||
|
||||
var n = 3;
|
||||
expect(searchParams.get("offset")).toEqual(null);
|
||||
@@ -619,7 +619,7 @@ test("Interacting with PaginationFooter requests page update", async () => {
|
||||
});
|
||||
expect(searchParams.get("offset")).toEqual("2");
|
||||
// FIXME: useSelector mocks prevent updateUsers from being called
|
||||
// expect(mockUpdateUsers).toBeCalledWith({
|
||||
// expect(mockUpdateUsers).toHaveBeenCalledWith({
|
||||
// ...defaultUpdateUsersParams,
|
||||
// offset: 2,
|
||||
// });
|
||||
|
Reference in New Issue
Block a user