fix toastr test and add jsdoc documentation