test: improved coverage

This commit is contained in:
alxshelepenok 2019-05-09 16:34:32 +03:00
parent 5df41ec339
commit 768464477d
2 changed files with 23 additions and 0 deletions

View File

@ -0,0 +1,11 @@
// @flow
import getContactHref from './get-contact-href';
test('getContactHref', () => {
expect(getContactHref('twitter', '#')).toBe('https://www.twitter.com/#');
expect(getContactHref('github', '#')).toBe('https://github.com/#');
expect(getContactHref('email', '#')).toBe('mailto:#');
expect(getContactHref('vkontakte', '#')).toBe('https://vk.com/#');
expect(getContactHref('telegram', '#')).toBe('telegram:#');
expect(getContactHref('rss', '#')).toBe('#');
});

View File

@ -0,0 +1,12 @@
// @flow
import getIcon from './get-icon';
import { ICONS } from '../constants';
test('getIcon', () => {
expect(getIcon('twitter')).toBe(ICONS.TWITTER);
expect(getIcon('github')).toBe(ICONS.GITHUB);
expect(getIcon('vkontakte')).toBe(ICONS.VKONTAKTE);
expect(getIcon('telegram')).toEqual(ICONS.TELEGRAM);
expect(getIcon('email')).toEqual(ICONS.EMAIL);
expect(getIcon('rss')).toEqual(ICONS.RSS);
});