Created
August 28, 2016 03:04
-
-
Save ericelliott/97ad722d1f65484752ced4cdcc145040 to your computer and use it in GitHub Desktop.
Chat reducer test factories
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const createChat = ({ | |
id = 0, | |
msg = '', | |
user = 'Anonymous', | |
timeStamp = 1472322852680 | |
} = {}) => ({ | |
id, msg, user, timeStamp | |
}); | |
const createState = ({ | |
userName = 'Anonymous', | |
chatLog = [], | |
statusMessage = 'Online', | |
currentChat = createChat() | |
} = {}) => ({ | |
userName, chatLog, statusMessage, currentChat | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment