Skip to content

Commit

Permalink
refactor(tests): clean up default mocks in mapPage.test.tsx
Browse files Browse the repository at this point in the history
  • Loading branch information
lemald committed Oct 23, 2023
1 parent c8c034e commit 5ab9ae5
Showing 1 changed file with 11 additions and 47 deletions.
58 changes: 11 additions & 47 deletions assets/tests/components/mapPage.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -84,71 +84,35 @@ import userInTestGroup, { TestGroups } from "../../src/userInTestGroup"
import { useMinischeduleRun } from "../../src/hooks/useMinischedule"
import pieceFactory from "../factories/piece"

jest.mock("../../src/hooks/useLocationSearchResults", () => ({
__esModule: true,
useLocationSearchResults: jest.fn(() => null),
}))
jest.mock("../../src/hooks/useLocationSearchResults")

jest.mock("../../src/hooks/useLocationSearchSuggestions", () => ({
__esModule: true,
useLocationSearchSuggestions: jest.fn(() => null),
}))
jest.mock("../../src/hooks/useLocationSearchSuggestions")

jest.mock("../../src/hooks/useLocationSearchResultById", () => ({
__esModule: true,
default: jest.fn(() => null),
useLocationSearchResultById: jest.fn(() => null),
}))
jest.mock("../../src/hooks/useLocationSearchResultById")

jest.mock("../../src/hooks/usePatternsByIdForRoute", () => ({
__esModule: true,
default: jest.fn(() => null),
}))
jest.mock("../../src/hooks/usePatternsByIdForRoute")

jest.mock("../../src/hooks/useNearestIntersection", () => ({
__esModule: true,
useNearestIntersection: jest.fn(() => {
return {
is_loading: true,
}
}),
}))

jest.mock("../../src/hooks/useVehicleForId", () => ({
__esModule: true,
default: jest.fn(() => null),
}))
jest.mock("../../src/hooks/useVehicleForId")

jest.mock("../../src/hooks/useVehiclesForRoute", () => ({
__esModule: true,
default: jest.fn(() => null),
}))
jest.mock("../../src/hooks/useVehiclesForRoute")

jest.mock("../../src/hooks/useAllStops", () => ({
__esModule: true,
useAllStops: jest.fn(() => []),
}))
jest.mock("../../src/hooks/useAllStops")

jest.mock("../../src/hooks/useStations", () => ({
__esModule: true,
useStations: jest.fn(() => []),
}))
jest.mock("../../src/hooks/useStations")

jest.mock("../../src/hooks/useMinischedule", () => ({
__esModule: true,
useMinischeduleRun: jest.fn(),
useMinischeduleBlock: jest.fn(),
}))
jest.mock("../../src/hooks/useMinischedule")

jest.mock("../../src/tilesetUrls", () => ({
__esModule: true,
tilesetUrlForType: jest.fn(() => null),
}))
jest.mock("../../src/tilesetUrls")

jest.mock("../../src/hooks/useSearchResultsByCategory", () => ({
__esModule: true,
default: jest.fn(() => null),
}))
jest.mock("../../src/hooks/useSearchResultsByCategory")

jest.mock("../../src/helpers/fullStory")

Expand Down

0 comments on commit 5ab9ae5

Please sign in to comment.