tests for trigger js
.add sinon / remove old checks
.fix possible error when calling trigger without valid argument