Unit test for angular 7 with Jasmine. I need to set the window.location.search
value in Jasmine.
I tried the following scenarios.
window.location.search = '?param=part1'
// It's not working. Browser reloaded or disconnected the unit test cases.
spyOnProperty(window.location, 'search').and.returnValue('?param=part1');
// Disconnected the unit test cases.
How can I set the window.location.search
value?