Skip to content

Commit 7f1083c

Browse files
hyperbolic-versorwebmaster128
authored andcommitted
test: add unit for faucetclient
1 parent 78338b8 commit 7f1083c

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

packages/faucet-client/src/faucetclient.spec.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,12 @@ describe("FaucetClient", () => {
2121
expect(new FaucetClient("https://localhost/")).toBeTruthy();
2222
});
2323

24+
(enabled ? it : xit)("should throw error if the base URL does not start with http:// or https://", () => {
25+
expect(() => new FaucetClient("ftp://example.com")).toThrowError(
26+
"Expected base url to start with http:// or https://",
27+
);
28+
});
29+
2430
(enabled ? it : xit)("can be used to credit a wallet", async () => {
2531
const faucet = new FaucetClient(faucetUrl);
2632
await faucet.credit(defaultAddress, primaryToken);

0 commit comments

Comments
 (0)