@kiwicom/smart-faq
Version:
19 lines (15 loc) • 527 B
JavaScript
// @flow
import { replaceDomain, addDeepLink } from '../UrlHelpers';
const URL = 'https://kiwi.com/asdg/4/';
const domain = 'https://kiwi.org';
describe('Url helpers', () => {
it(`replaceDomain(${URL}, ${domain})`, () => {
const result = 'https://kiwi.org/asdg/4/';
expect(replaceDomain(URL, domain)).toEqual(result);
});
it('create deeplinks', () => {
const result =
'https://kiwi.com/asdg/4/?deeplink=insurance&source=smartfaq';
expect(addDeepLink(URL, 'insurance')).toEqual(result);
});
});