social-links
Version:
Validate & sanitize social links
25 lines • 1.07 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
var main_1 = require("../main");
describe('PROFILE: linktree', function () {
var sl;
beforeEach(function () {
sl = new main_1.SocialLinks();
});
var testProfileDesktop = function (profile, profileId, desktop) {
expect(sl.hasProfile(profile)).toBeTruthy();
expect(sl.isValid(profile, desktop)).toBeTruthy();
expect(sl.getProfileId(profile, desktop)).toBe(profileId);
expect(sl.getLink(profile, profileId)).toBe(desktop);
expect(sl.getLink(profile, profileId, main_1.TYPE_DESKTOP)).toBe(desktop);
expect(sl.sanitize(profile, desktop)).toBe(desktop);
expect(sl.sanitize(profile, desktop, main_1.TYPE_DESKTOP)).toBe(desktop);
};
it('should linktree', function () {
var profile = 'linktree';
var profileId = 'gkucmierz';
var desktop = "https://linktr.ee/".concat(profileId);
testProfileDesktop(profile, profileId, desktop);
});
});
//# sourceMappingURL=linktree.spec.js.map