add event JS test and samples