Fix toastr test and add jsdoc comments