Advanced Node and Express - SocketIo test issue

<%= @topic_view.topic.title %>
<%= @topic_view.topic.average_rating %> <%= @topic_view.topic.posts.count { |p| !!p.custom_fields['rating'] } %>

I’m trying to pass the last 6 challenges. My code works normally but all tests in all 6 challenges get ‘error’ message. Can someone help me review my code to solve this issue.
Here is my code: https://glitch.com/edit/#!/rainbow-albatross