forked from Dshield-xyz/Dshield
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathexplorer.test.ts
More file actions
20 lines (17 loc) · 756 Bytes
/
Copy pathexplorer.test.ts
File metadata and controls
20 lines (17 loc) · 756 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
import { describe, it, expect } from "vitest";
import { explorerTxUrl, explorerContractUrl, getNetworkLabel } from "./explorer";
// No env is loaded in tests, so the network passphrase falls back to the
// standalone default — exercising the "local, no explorer" branch.
describe("explorer (local network default)", () => {
it("labels the network as local", () => {
expect(getNetworkLabel()).toBe("Local / Standalone");
});
it("returns no explorer links on a network without one", () => {
expect(explorerTxUrl("abc123")).toBeNull();
expect(explorerContractUrl("CABC")).toBeNull();
});
it("returns null for empty inputs", () => {
expect(explorerTxUrl("")).toBeNull();
expect(explorerContractUrl("")).toBeNull();
});
});