Created
February 15, 2018 21:49
-
-
Save agnanachandran/3428b22bc7f9444e6da0f1fce8e37000 to your computer and use it in GitHub Desktop.
tests/notifications_view_container_test.tsx
This file contains hidden or 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
describe('NotificationsViewContainer', () => { | |
it('should render NotificationsView', () => { | |
const readNotification = new Notification('1', 'read', 100, true); | |
const unreadNotification = new Notification('2', 'unread', 101, false); | |
const unreadNotification2 = new Notification('3', 'unread2', 102, false); | |
const notifications = [readNotification, unreadNotification, unreadNotification2]; | |
const notificationsStore = NotificationsStore.initialize(notifications); | |
const wrapper = mount( | |
<NotificationsViewContainer | |
notificationsStore={ notificationsStore } | |
/> | |
); | |
const notificationsViewElements = wrapper.find(NotificationsView); | |
expect(notificationsViewElements).to.have.length(1); | |
expect(notificationsViewElements.props().unreadNotifications).to.have.length(2); | |
expect(notificationsViewElements.props().readNotifications).to.have.length(1); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment