fix bug in JS test framewrok