fix test according to new JS API