Skip to content
Prev Previous commit
Next Next commit
fix all js tests
  • Loading branch information
f0ssel committed Nov 14, 2022
commit ef32b99f2a299fc95bc97cb0c7ab9124ac930894
2 changes: 1 addition & 1 deletion site/src/pages/UsersPage/UsersPage.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ describe("UsersPage", () => {

const mock = jest
.spyOn(API, "getUsers")
.mockResolvedValueOnce({ users: [MockUser, MockUser2], count: 2 })
.mockResolvedValueOnce({ users: [MockUser, MockUser2], count: 26 })

const nextButton = await screen.findByLabelText("Next page")
expect(nextButton).toBeEnabled()
Expand Down
2 changes: 1 addition & 1 deletion site/src/testHelpers/handlers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ export const handlers = [
rest.get("/api/v2/users", async (req, res, ctx) => {
return res(
ctx.status(200),
ctx.json([M.MockUser, M.MockUser2, M.SuspendedMockUser]),
ctx.json({ users: [M.MockUser, M.MockUser2, M.SuspendedMockUser], count: 26 }),
)
}),
rest.get("/api/v2/users/me/organizations", (req, res, ctx) => {
Expand Down