Port of testatoo in javascript