Adding error case in test
This commit is contained in:
parent
1435ec89c9
commit
ddabda1c4b
1 changed files with 6 additions and 0 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue