describe('CommentStore', () => { it('should propagate comments when loaded successfully', () => { const commentList = [{ name: 'John', content: 'It looks good!' }, { name: 'Jane', content: 'Good job, dude!' }]; const listener = AppDispatcher.register.mock.calls[0][0]; listener({ type: CommentConstants.LOAD_COMMENT_SUCCESS, payload: { comment: { commentList, } } }); expect(CommentStore.getComment()).toEqual(commentList); }); });