Test javascript methods