iuttam
07-03-2012, 02:17 PM
I am working on writing a Qunit test for my javascript function. My function has a if statement like this:
if(window.location.pathname.toLowerCase() == "/search/home.html" )
{.........................}
Everything I do is inside this if statement. I need to find a way how I can mock the window.location.pathname from my test case. I would highly appreciate your suggestions.
if(window.location.pathname.toLowerCase() == "/search/home.html" )
{.........................}
Everything I do is inside this if statement. I need to find a way how I can mock the window.location.pathname from my test case. I would highly appreciate your suggestions.