BS-11777, fix javascript test strange issue, better test