title: Access directive attribute value in the jasmine test
body: <p>I have a example AngularJS directive like this <code>&lt;div some-dir="5" /&gt;</code></p>
  
  <p>How would I access this directive attribute value of <code>5</code> inside my test?</p>
  
  <pre><code>describe("some-dir", function() {
      var element, scope;
      beforeEach(module('app'));
      beforeEach(inject(function($rootScope, $compile) {
  
          scope = $rootScope;
          element = angular.element('&lt;div&gt;&lt;div id="el1" some-dir="5" /&gt;&lt;/div&gt;');
          $compile(element)(scope);
          scope.$digest();
  
      }));
  
      it('should be able to get the attribute value', function(){
  
         // get the attr value of some-dir
  
  
      });
  
  });
  </code></pre>