tangoclinh1995 / thehonorclub-mobileapp

The Honor Club's Mobile App Project for COMP 3111H
2 stars 1 forks source link

Unit testing directive #62

Closed svm96 closed 7 years ago

svm96 commented 7 years ago

Hi, I'm writing the unit testing for the card controller, and I don't know how to test this directive code: `.directive('noScroll', function() {

return { restrict: 'A', link: function($scope, $element, $attr) {

  $element.on('touchmove', function(e) {
    e.preventDefault();
  });
}

} })` I've tried something (take a look at card_testing branch), but it doesn't work. What do you think I should do?

tangoclinh1995 commented 7 years ago

Take a look at this site: https://www.sitepoint.com/angular-testing-tips-testing-directives/

I think the information provided is sufficient