Fix js test to check properly in window object