diff options
Diffstat (limited to 'test/AngularSpec.js')
| -rw-r--r-- | test/AngularSpec.js | 13 | 
1 files changed, 13 insertions, 0 deletions
| diff --git a/test/AngularSpec.js b/test/AngularSpec.js index 1b08a18e..36d4926e 100644 --- a/test/AngularSpec.js +++ b/test/AngularSpec.js @@ -1079,4 +1079,17 @@ describe('angular', function() {      }    }); +  describe('isElement', function() { +    it('should return a boolean value', inject(function($compile, $document, $rootScope) { +      var element = $compile('<p>Hello, world!</p>')($rootScope), +          body = $document.find('body')[0], +          expected = [false, false, false, false, false, false, false, true, true], +          tests = [null, undefined, "string", 1001, {}, 0, false, body, element]; +      angular.forEach(tests, function(value, idx) { +        var result = angular.isElement(value); +        expect(typeof result).toEqual('boolean'); +        expect(result).toEqual(expected[idx]); +      }); +    })); +  });  }); | 
