Skip to content

Commit 8bc407c

Browse files
author
JF
committed
tests
1 parent fa65946 commit 8bc407c

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

src/hydra/parseHydraDocumentation.test.js

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1306,14 +1306,12 @@ test("Invalid docs JSON", async () => {
13061306

13071307
fetch.mockResponses([entrypoint, init], [docs, init]);
13081308

1309-
const expectedError = {};
1309+
let expectedError = {};
13101310

13111311
try {
13121312
await parseHydraDocumentation("http://localhost/");
13131313
} catch (error) {
1314-
expectedError.api = error.api;
1315-
expectedError.response = error.response;
1316-
expectedError.status = error.status;
1314+
expectedError = error;
13171315
}
13181316

13191317
expect(expectedError).toHaveProperty("api");
@@ -1326,14 +1324,12 @@ test("Invalid entrypoint JSON", async () => {
13261324

13271325
fetch.mockResponses([entrypoint, init], [docs, init]);
13281326

1329-
const expectedError = {};
1327+
let expectedError = {};
13301328

13311329
try {
13321330
await parseHydraDocumentation("http://localhost/");
13331331
} catch (error) {
1334-
expectedError.api = error.api;
1335-
expectedError.response = error.response;
1336-
expectedError.status = error.status;
1332+
expectedError = error;
13371333
}
13381334

13391335
expect(expectedError).toHaveProperty("api");

0 commit comments

Comments
 (0)