add unit test for popURL JavaScript method