UNPKG

@citizenwallet/sdk

Version:

An sdk to easily work with citizen wallet.

22 lines 996 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const index_1 = require("./index"); describe("parseAliasFromDomain", () => { const basePath = "citizenwallet.xyz"; it("should extract alias from subdomain with base path", () => { const domain = "gratitude.citizenwallet.xyz"; const result = (0, index_1.parseAliasFromDomain)(domain, basePath); expect(result).toBe("gratitude"); }); it("should return full domain when base path does not match", () => { const domain = "wallet.sfluv.org"; const result = (0, index_1.parseAliasFromDomain)(domain, basePath); expect(result).toBe("wallet.sfluv.org"); }); it("should handle multiple subdomains with base path", () => { const domain = "something.other.citizenwallet.xyz"; const result = (0, index_1.parseAliasFromDomain)(domain, basePath); expect(result).toBe("something.other"); }); }); //# sourceMappingURL=index.test.js.map