diff --git a/src/components/Contexts/VehicleContext.jsx b/src/components/Contexts/VehicleContext.jsx index e525ef7..3896f9d 100644 --- a/src/components/Contexts/VehicleContext.jsx +++ b/src/components/Contexts/VehicleContext.jsx @@ -89,10 +89,10 @@ export const VehicleProvider = ({ children }) => { } }; - const getLocations = async (token, mapLocationInfo) => { + const getLocations = async (token) => { try { setBusy(true); - const result = await api.getLocations(token, mapLocationInfo); + const result = await api.getLocations(token); if (result.error) throw new Error(`Get locations error. ${result.message}`); return result; diff --git a/src/components/Contexts/VehicleContext.test.jsx b/src/components/Contexts/VehicleContext.test.jsx index 867d8d9..a8c79d5 100644 --- a/src/components/Contexts/VehicleContext.test.jsx +++ b/src/components/Contexts/VehicleContext.test.jsx @@ -9,7 +9,6 @@ import { } from "@testing-library/react"; import { VehicleProvider, useVehicleContext } from "./VehicleContext"; import { StatusProvider, useStatusContext } from "./StatusContext"; -import { act } from "react-dom/test-utils"; const checkVehicleResult = (error, busy, vehicle) => { checkBaseResults(error, busy); @@ -438,56 +437,6 @@ describe("VehicleContext", () => { checkBaseResults("", "false"); }); }); - - describe("Get Locations", () => { - var locationFilter = { - center: { - longitude: 0, - latitude: 0 - }, - width: 0, - height: 0 - } - - var locations; - beforeEach(() => { - const TestComp = () => { - const { busy, error, getLocations } = useVehicleContext(); - - return ( - <> -
{error}
-
{busy.toString()}
-