Help in Advanced Node and Express - Create New Middleware

Hello, I am not sure whats wrong, it works just fine as expected


its properly redirect to the home if you are not logged in
but i dont get the second test to pass it shows:

An attempt to go to the profile at this point should redirect to the homepage since we are not logged in


in the ‘/’ route, changing {title: ‘Hello’, message: ‘Please login’, showLogin: true} to {title: ‘Home Page’, message: ‘Please login’, showLogin: true} worked for me


Ohhhhhhhh, thank you

Thanks tarik-ali,

How did you find the solution?

Thanks, changing the title string made the test pass.
I tried to add your solution (with credits, of course) to the hints, but unfortunately the repository is now read-only and doesn’t accept pull request.

This worked for me too.

Give me some advice on this: