mirror of
https://github.com/mastermindzh/rickvanlieshout.com
synced 2024-12-26 06:49:18 +01:00
test: improved coverage
This commit is contained in:
parent
5df41ec339
commit
768464477d
11
src/utils/get-contact-href.test.js
Normal file
11
src/utils/get-contact-href.test.js
Normal 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('#');
|
||||
});
|
12
src/utils/get-icon.test.js
Normal file
12
src/utils/get-icon.test.js
Normal 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);
|
||||
});
|
Loading…
Reference in New Issue
Block a user