diff --git a/packages/graphhopper/graphhopper.test.ts b/packages/graphhopper/graphhopper.test.ts index 221f9bb..e9450de 100644 --- a/packages/graphhopper/graphhopper.test.ts +++ b/packages/graphhopper/graphhopper.test.ts @@ -1,8 +1,8 @@ import { GraphHopper } from "./index" describe("GraphHopper returns responses", () => { + const g = new GraphHopper({ baseUrl: "http://localhost:8989" }) it("gets a directions response", async () => { - const g = new GraphHopper({ baseUrl: "http://localhost:8989" }) await g .directions( [ @@ -31,7 +31,6 @@ describe("GraphHopper returns responses", () => { }) it("gets an isochrones response", async () => { - const g = new GraphHopper({ baseUrl: "http://localhost:8989" }) await g.reachability([42.51007, 1.53789], "car", [600]).then((i) => { expect(i.raw).toBeDefined() expect(i.isochrones).toHaveLength(1) diff --git a/packages/ors/ors.test.ts b/packages/ors/ors.test.ts index 37ca025..f73bb37 100644 --- a/packages/ors/ors.test.ts +++ b/packages/ors/ors.test.ts @@ -1,11 +1,10 @@ import { ORS } from "./index" describe("ORS returns responses", () => { + const ors = new ORS({ + baseUrl: "http://localhost:8080/ors", + }) it("gets a direction response", async () => { - const ors = new ORS({ - baseUrl: "http://localhost:8080/ors", - }) - await ors .directions( [ @@ -23,10 +22,6 @@ describe("ORS returns responses", () => { }) it("gets a direction response from geojson endpoint", async () => { - const ors = new ORS({ - baseUrl: "http://localhost:8080/ors", - }) - await ors .directions( [ @@ -47,10 +42,6 @@ describe("ORS returns responses", () => { }) it("gets an isochrone response", async () => { - const ors = new ORS({ - baseUrl: "http://localhost:8080/ors", - }) - await ors .reachability([42.5063, 1.51886], "driving-car", [150, 300]) .then((i) => { @@ -59,10 +50,6 @@ describe("ORS returns responses", () => { }) it("gets a matrix response", async () => { - const ors = new ORS({ - baseUrl: "http://localhost:8080/ors", - }) - await ors .matrix( [ diff --git a/packages/osrm/osrm.test.ts b/packages/osrm/osrm.test.ts index 12ef327..4d01567 100644 --- a/packages/osrm/osrm.test.ts +++ b/packages/osrm/osrm.test.ts @@ -1,8 +1,8 @@ import { OSRM } from "./index" describe("OSRM returns responses", () => { + const o = new OSRM({ baseUrl: "http://localhost:5000" }) it("gets a direction response", async () => { - const o = new OSRM({ baseUrl: "http://localhost:5000" }) await o .directions( [ @@ -19,7 +19,6 @@ describe("OSRM returns responses", () => { }) it("gets a matrix response", async () => { - const o = new OSRM({ baseUrl: "http://localhost:5000" }) await o .matrix( [ diff --git a/packages/valhalla/valhalla.test.ts b/packages/valhalla/valhalla.test.ts index 1d1317d..a6e9b4e 100644 --- a/packages/valhalla/valhalla.test.ts +++ b/packages/valhalla/valhalla.test.ts @@ -1,8 +1,8 @@ import { Valhalla } from "./index" describe("Valhalla returns responses", () => { + const v = new Valhalla({ baseUrl: "http://localhost:8002" }) it("gets a directions response", async () => { - const v = new Valhalla({ baseUrl: "http://localhost:8002" }) await v .directions( [ @@ -31,7 +31,6 @@ describe("Valhalla returns responses", () => { }) it("gets an isochrone response", async () => { - const v = new Valhalla({ baseUrl: "http://localhost:8002" }) await v .reachability([42.50823, 1.52601], "pedestrian", [30, 90]) .then((i) => { @@ -41,7 +40,6 @@ describe("Valhalla returns responses", () => { }) it("gets an isochrone response with polygons", async () => { - const v = new Valhalla({ baseUrl: "http://localhost:8002" }) await v .reachability([42.50823, 1.52601], "pedestrian", [30, 90], { polygons: true, @@ -58,7 +56,6 @@ describe("Valhalla returns responses", () => { }) it("gets an matrix response", async () => { - const v = new Valhalla({ baseUrl: "http://localhost:8002" }) await v .matrix( [