Adding error case in test
This commit is contained in:
parent
1435ec89c9
commit
ddabda1c4b
@ -23,4 +23,10 @@ describe("MapFetcher", () => {
|
|||||||
it("should return false on an DNS resolving to a global domain", async () => {
|
it("should return false on an DNS resolving to a global domain", async () => {
|
||||||
expect(await mapFetcher.isLocalUrl("https://maps.workadventu.re")).toBeFalse();
|
expect(await mapFetcher.isLocalUrl("https://maps.workadventu.re")).toBeFalse();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it("should throw error on invalid domain", async () => {
|
||||||
|
await expectAsync(
|
||||||
|
mapFetcher.isLocalUrl("https://this.domain.name.doesnotexistfoobgjkgfdjkgldf.com")
|
||||||
|
).toBeRejected();
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user