Skip to content

Commit 0cecc80

Browse files
committed
test: Clarify naming of JSON parsing test
1 parent 2011bae commit 0cecc80

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

__tests__/ipinfoWrapper.test.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -197,13 +197,14 @@ describe("IPinfoWrapper", () => {
197197
await expect(ipinfo.lookupIp("1.2.3.4")).rejects.toThrow();
198198
});
199199

200-
test("Error is thrown when response cannot be parsed", async () => {
201-
const baseUrlWithUnparseableResponse =
202-
"https://ipinfo.io/developers?path=";
200+
test("Error is thrown when response cannot be parsed as JSON", async () => {
201+
const baseUrlWithUnparseableResponse = "https://ipinfo.io/developers#";
202+
203203
const ipinfo = new IPinfoWrapper(
204204
"token",
205205
baseUrlWithUnparseableResponse
206206
);
207+
207208
await expect(ipinfo.lookupIp("1.2.3.4")).rejects.toThrow();
208209

209210
const status = await ipinfo

0 commit comments

Comments
 (0)