Skip to content

Commit 184be46

Browse files
committed
chore[tests]: cleanup tests from previous work
1 parent bbdddb5 commit 184be46

File tree

2 files changed

+1
-75
lines changed

2 files changed

+1
-75
lines changed

test/index.ts

+1-18
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ import eneryIQ_savings_response from "./response.eneryIQ.savings.json";
1717
import eneryIQ_tariff_response from "./response.eneryIQ.tariff.json";
1818
import heating_system_response from "./response.heatingSystem.json";
1919
import home_response from "./response.home.json";
20-
import home_response_x from "./response.home.x.json";
2120
import incident_detection_response from "./response.incidentDetection.json";
2221
import installations_response from "./response.installations.json";
2322
import invitations_response from "./response.invitations.json";
@@ -73,13 +72,7 @@ describe("Low-level API tests", async () => {
7372

7473
it('Login and get "me"', async () => {
7574
nock("https://auth.tado.com").post("/oauth/token").reply(200, auth_response);
76-
nock("https://my.tado.com")
77-
.get("/api/v2/me")
78-
.reply(200, me_response)
79-
.get("/api/v2/me")
80-
.reply(200, me_response) // Needed twice otherwise consumed by login
81-
.get("/api/v2/homes/1907")
82-
.reply(200, home_response);
75+
nock("https://my.tado.com").get("/api/v2/me").reply(200, me_response);
8376

8477
const tado = new Tado();
8578
await tado.login("username", "password");
@@ -111,11 +104,6 @@ describe("High-level API tests (v2)", async () => {
111104

112105
beforeEach(async () => {
113106
nock("https://auth.tado.com").post("/oauth/token").reply(200, auth_response);
114-
nock("https://my.tado.com")
115-
.get("/api/v2/me")
116-
.reply(200, me_response)
117-
.get("/api/v2/homes/1907")
118-
.reply(200, home_response);
119107

120108
tado = new Tado();
121109
await tado.login("username", "password");
@@ -840,11 +828,6 @@ describe("High-level API tests (TadoX)", async () => {
840828

841829
beforeEach(async () => {
842830
nock("https://auth.tado.com").post("/oauth/token").reply(200, auth_response);
843-
nock("https://my.tado.com")
844-
.get("/api/v2/me")
845-
.reply(200, me_response)
846-
.get("/api/v2/homes/1907")
847-
.reply(200, home_response_x);
848831

849832
tado = new TadoX();
850833
await tado.login("username", "password");

test/response.home.x.json

-57
This file was deleted.

0 commit comments

Comments
 (0)