We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6c98c79 commit 3c35616Copy full SHA for 3c35616
src/config.js
@@ -16,6 +16,7 @@ const config = (() => {
16
17
const setEmoji = ({ type, emoji }) => {
18
defaultConfig[type].emoji = emoji;
19
+ return emoji;
20
};
21
22
const getEmoji = type => defaultConfig[type].emoji;
tests/config.test.js
@@ -0,0 +1,14 @@
1
+import config from '../src/config';
2
+
3
+describe('config', () => {
4
+ test('should set emoji by type', () => {
5
+ const expected = config.setEmoji({ type: 'info', emoji: '🦁' });
6
+ expect(expected).toEqual('🦁');
7
+ });
8
9
+ test('should get emoji by type', () => {
10
+ const expected = config.getEmoji('error');
11
+ console.log(expected);
12
+ expect(expected).toEqual('🚫');
13
14
+});
0 commit comments